I need to alter sources.list I am able to make the changes but it will not save, keeps saying I don't have the permissions to do that.
3 Answers
You need root privileges to edit that file. Open the file from a terminal and type "sudo" in front of your editor of choice. More on sudo: http://en.wikipedia.org/wiki/Sudo
For example:
sudo nano /etc/apt/sources.list
Nano is a fairly simple editor. See this question How to edit files in a terminal with nano? if you want to know more on how to use it.
You can use gedit as your text editor, which is the default text editor on Ubuntu 11.10 and edit the /etc/apt/sources.list file by running this command:
gksudo gedit /etc/apt/sources.list
What this does is it opens the file with root privileges using gedit, which is your default text editor.
-
3
-
Thank you. So is it gksudo or gksu?– user33468Dec 6, 2011 at 3:03
-
1In Ubuntu, those are actually the same thing: askubuntu.com/questions/21033/… Dec 7, 2011 at 17:49
To be able to edit files with root privileges directly from the standard file browser, Nautilus, install nautilus-gksu. This will add a "Open as administrator" entry to the context (right click) menu in Nautilus.
To install, in a terminal, type
sudo apt-get install nautilus-gksu
To get the entry to show in 11.10 also run
sudo cp /usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/
Then log out and in again, and go to the sources.list file in Nautilus. Right click it, choose "Open as Administrator", authenticate and the text file will open in gedit with superuser rights.
sources.list
?