Ubuntu: mv: cannot stat ‘sources.list’: No such file or directory [duplicate]



Question:

This question already has an answer here:

I am trying to run the following command in my system after navigating to the directory cd /etc/apt

 Clean update:  cd /etc/apt  #out put stella@stella-box:/etc/apt$    sudo mv sources.list sources.list.ok     #output mv: cannot stat ‘sources.list’: No such file or directory    #Recreate sources.list and add these 4 lines to it.  deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted   universe multiverse   deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main   restricted universe multiverse   deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main   restricted universe multiverse   deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main   restricted universe multiverse       sudo apt-get clean   sudo apt-get update  sudo apt install python3-pip  sudo apt-get install cmake    

I enter the next line it returns " mv: cannot stat ‘sources.list’: No such file or directory" please guys how do I fixed this error?


Solution:1

"No such file or directory" means exactly that.

If you really want to rename a particular file name but there's no such file name you can always create one like it:

touch /etc/apt/sources.list  

or even

: > /etc/apt/sources.list  

Though I don't know what that's going to achieve or what you're trying to achieve here since didn't tell us.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »