I am wondering how to find the /etc/apt/sources.conf file
in Ubuntu 16.04.4 terminal ? It should contains URLs to archive.ubuntu.com.
I am wondering how to find the /etc/apt/sources.conf file
in Ubuntu 16.04.4 terminal ? It should contains URLs to archive.ubuntu.com.
The file is just
/etc/apt/sources.list
. Thefile
part is just referring to the file that it just mentions, which is/etc/apt/sources.list
My favorite way to do this is by traversing the directory structure. To move up a level in the directory, it's
../
.You want to go all the way to the filesystem root to get to /etc. So, that's up two levels of directories - assuming you started in your /home/user directory.
So, let's say I want to edit the file you probably meant to mention -
sources.list
. My command would look like:The sudo is, of course, to elevate my permissions. The 'nano' is a text editor that you can use in the terminal - and it's easy to learn to use. Then, the following is the path to the file.
As you see in the path, I went up two levels, each with a
../
. That takes me to the filesystems root (not to be confused with root user) which is just plain/
. Once it takes me there, it then digs down into the directories and opens the file in question.If, for some reason, you were in your Downloads folder (under your /home/user directory) then it'd be:
It's pretty easy this way, so long as you know where you are in the directory structure.