Edit Read Only File [Solved}

New to Debian (Or Linux in general)? Ask your questions here!

Edit Read Only File [Solved}

Postby llewellen » 2018-04-11 04:22

For some reason my /etc/apt/sources.list file still has a line pointing to the installation DVD (usb). It has one such line commented out with # but still has another identical one remaining. I want to remove the remaining line or comment it out but the file is read only and denies me permission to make changes. How to edit?

BTW the sources. list file also has two lines pointing to mirrors, which will remain.

Thank you.
Last edited by llewellen on 2018-04-11 05:04, edited 1 time in total.
It is not that I am mad; it's only that my head is different from yours - Diogenes of Sinope
llewellen
 
Posts: 88
Joined: 2018-04-08 05:21
Location: Vancouver Island, Canada

Re: Edit Read Only File

Postby 4D696B65 » 2018-04-11 04:46

You need to be root to edit system files.

Open a terminal, su with root password and
Code: Select all
nano /etc/apt/sources.list

ctrl + o writes
ctrl + x exits nano
update apt
Code: Select all
apt update

we are done
Code: Select all
exit
User avatar
4D696B65
 
Posts: 2197
Joined: 2009-06-28 06:09

Re: Edit Read Only File

Postby llewellen » 2018-04-11 05:03

I ran gedit as root and commented out the offending line, saved the changes. Then a long list of Warnings were returned in the terminal. Hmmm. However, Synaptic then ran perfectly OK and installed the packages I selected. Sorry but I didn't save all the text that was returned in terminal.
It is not that I am mad; it's only that my head is different from yours - Diogenes of Sinope
llewellen
 
Posts: 88
Joined: 2018-04-08 05:21
Location: Vancouver Island, Canada


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable