LinuxFeb 13, 20131 min read Add and append text to a file There are different ways, I like is: echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn append text to a file echo "ServerName localhost-appended" | sudo tee -a /etc/apache2/conf.d/fqdn #bash commands