I'm trying to change /etc/hosts file with sed command , I use sudo to execute the following command
sudo sed 's/127.0.0.1 localhost/127.0.0.1 localhost mydomain.com/g' /etc/hosts |sudo cat > /etc/hosts
but this is the error that I get
-bash: /etc/hosts: Permission denied
Aucun commentaire:
Enregistrer un commentaire