Find the answer to your Linux question:
Results 1 to 6 of 6
I'm trying to add a line of code to this file, but I can't overwrite it. How can I do what I am trying to do? Thanks, Kopkins...
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    28

    [SOLVED] /etc/apt/sources.list

    I'm trying to add a line of code to this file, but I can't overwrite it. How can I do what I am trying to do?

    Thanks,
    Kopkins

  2. #2
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,073
    The easiest way I can think of is to use nano.
    As root:
    Code:
    nano /etc/apt/sources.list
    Make your changes, then hit Ctrl-x, y, <Enter>.
    Then,
    Code:
    apt-get update
    Last edited by jayd512; 01-06-2012 at 08:51 PM. Reason: spelling
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    28
    When I go to do it, there is no text, and if I try to save it, it says there is no such file.

  4. #4
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,073
    Post the output of the following (as root):
    Code:
    cat /etc/apt/sources.list
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  5. #5
    Just Joined!
    Join Date
    Jan 2012
    Posts
    28
    tried that got the whole file, then tried nano and it still didn't work then did all that again and it worked fine. I must have been typing doing something wrong. Thanks for the help with nano. solved.

    Thanks,
    Kopkins

  6. #6
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,073
    Glad you got it sorted!
    I'll mark this as SOLVED.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

Posting Permissions

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