Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Ok, so I was recently pulled into the world of linux through my purchase of an EEE pc. So I'm trying to get it setup, I find a tutorial on how to install wine, but it wants me to edit /etc/apt/sources.list. A similar tutorial for dosbox had me do the same.
It first suggests I run konsole to allow pasting.
It then tells me to use the command sudo nano /etc/apt/sources.list
I understand that, I think. sudo (the important part) gives full access to the file, supposedly. nano is the text editor that is being given super user privileges, and /etc/apt/sources.list is the file.
However, I save the file and close it, and when I open it, it is unchanged. I browse to the folder, and I see it is creating sources.list.save, sources.list.save 1, etc... All of these files are marked as owned by the root, I figure sudo rm /etc/apt/sources.list.save* will remove them, but my main concern is an inability to edit the file I want.
I'd login as root just for this process, but don't even know how to do that.
sudo should be able to give the privileges neede unless some sore of unusual configuration on sudoers, however, to become root, open konsole (or any other terminal emulator) and type just su, it will ask you for the root pass, type it and press Enter, from then, you can edit the sources just using nano /etc/apt/sources.list
Hmm, ok. I type su and it gives the password prompt. I don't know my root password, but i heard someone say on these systems that it's the same as your password. I typed that in and I guess it worked. The prompt changed from /home/users> to eeepc-myname:/home/users>
I tried editing the file with just nano /etc/apt/sources.list and it does the same thing. It seems to change, but when I check it's the same. Sure enough I'm now up to .save 5
I can only guess some config file is unusually configured (the only other thing I've done on this system is use synaptic to install a few essential packs that this computer would be in kid mode without.) it seems like the changes I made with synaptic took.
I would suggest using vi (or vim) instead of nano. I think what is going on is nano is saving to a different file, which you have to "mv" onto the file you are editing for the changes to take effect. try to view the '.save's and see if those have the changes. if so, do a quick 'mv (file) sources.list' and you should be ok.
I wouldn't recommend simply overwriting critical files anyway. What if sometimes goes wrong ? It's safer to make a copy first and give it a slightly different name, for example adding .bak to the extension, then edit the original.
As for nano, it doesn't work any different from vim. If it created a different file, how would it know what to name it? No, it simply uses the original just as vim does.
Did you use Ctrl+O and Ctrl+X to save your changes?
I found the problem. You press x to exit, and then yes to save the buffer. It is then asking me what file to save to. I kept assuming it was done and closed the console. I needed to press enter one more time. That's it. I just didn't hit enter enough.
Don't worry, I'll punch myself for you. Dang, I don't think my mother (who keeps making the "any key" joke.) would make such a silly mistake. Thank you all for your help.
I think mv one of the .save files would have worked too, yes.
Also, before i did this I did a cp on the sources.list and made a sources.list.bak
Update: Ah, I see ya'll could tell what i was doing wrong anyway, so if my brain didn't work, well darn. You've got a resolution for even that.
Last edited by JudgeMonkey; 12-19-2007 at 11:26 PM.