How do I change my user permissions to edit /etc/apt/sources.list?
62,546
Solution 1
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.
Solution 2
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.
Related videos on Youtube
Author by
Jorge Castro
Updated on September 18, 2022Comments
-
Jorge Castro over 1 year
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.
-
Knowledge Cube over 12 yearsWelcome to Ask Ubuntu! What program/utility are you using to edit
sources.list
? -
david6 over 12 yearsIt would be much safer to edit using Ubuntu Tweak (my preferred) or Ubuntu Software Center.
-
-
red.clover over 12 years
gksu
please. unix.stackexchange.com/questions/2958/… -
user85343 over 12 yearsThank you. So is it gksudo or gksu?
-
red.clover over 12 yearsIn Ubuntu, those are actually the same thing: askubuntu.com/questions/21033/…