echo ‘One line content here’ | sudo tee /etc/apache2/filename.txt
You can use echo “One line content here’ > filename.txt if the folder is not protected.
echo ‘One line content here’ | sudo tee /etc/apache2/filename.txt
You can use echo “One line content here’ > filename.txt if the folder is not protected.