Find the answer to your Linux question:
Results 1 to 4 of 4
After an installation of Ubuntu, I've decided to add to the apt-get repository lists. The problem is that I cannot get the security access to the etc/apt/sources.list to add the ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2

    How to edit etc/apt/sources.list

    After an installation of Ubuntu, I've decided to add to the apt-get repository lists.

    The problem is that I cannot get the security access to the etc/apt/sources.list to add the links, since it says I do not have the permission to do so.

    I messed with linux when I was in high school (I'm 22, now) but can no longer remember the commands to change the ownership out of Root. I would assume it's either Chmod or Chown or something to that sort, but any help is appreciated.

  2. #2
    Linux User
    Join Date
    Jun 2006
    Location
    Scotland
    Posts
    267
    gksudo gedit /etc/apt/sources.list
    You could also add them by Synaptic. Synaptic>Settings>Repositoties...

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Ubuntu guide on graphically managing repositories:
    https://help.ubuntu.com/community/Repositories/Ubuntu

    From the command line:
    https://help.ubuntu.com/community/Re...es/CommandLine

    In general, at the command line, you can preface any command with sudo to run said command with root privileges. This is generally considered more secure than logging in as root to work. A user's sudo privileges are defined in the file /etc/sudoers. By default, the first user you create with Ubuntu will have full admin privileges with sudo. If you create a user after install, you would have to add privileges for that user.

    https://help.ubuntu.com/community/Sudoers

    Some distros, notably Fedora, do not use sudo by default, and instead you create a password for the root user. For these distro, you can log in as root with
    Code:
    su -
    or run a command as root with
    Code:
    su -c <command>
    It is perfectly possible to install and use sudo instead or as well with these distros.

    Chown changes the ownership of a file. You do not want to change the ownership from root of files in the root directory.

    Chmod changes the permissions on a file, ie, which users are allowed to read, write, or execute the file. There are occasions where you might change permissions on a file owned by root, but generally you also do not want to do this.

    EDIT: I should add, gksu or gksudo is a GTK graphical frontend for sudo. It's generally used by the GNOME desktop. The KDE desktop equivalent is kdesu. Usually, you would use this if you open a run dialog via ALT+F2, or if you're launching a program that needs root privileges with GNOME-Do.

  4. #4
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2
    My oh my... Things have changed in the past 7 years drastically.

    thanks guys!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...