I am unable to access or write to etc/hosts file
I am attempting to edit the
etc/hosts file. I am able to access it through the graphic file system to find that it is read only. When using
sudo nano etc/hosts as many suggest, I see that the directory
etc doesn’t exist although i can see it in the GUI, so I assume it is just creating a new file in a new directory rather than opening the existing one. I cannot even make
/etc/ my working directory as if it does not exist. Both
hosts file exist I am just unable to access it through the terminal or edit it through the graphic interface.
I run into a similar issue when using
chown, being told the file/directory does not exist.
I find the file in question under "other locations" in the file manager and was able to drag the
/etc/ folder to my bookmarks thinking that would do something but it didnt. Is this a partition or mounting issue? I apologize if this is silly I am very new to ubuntu.
Thank you for any help
You are missing a slash in the beginning of the filename … it should be
The difference is that without the slash,the path/filename is relative to the directory you currently are in. WITH the slash
it is absolute from the top of the filesystem.