Editing a file as root in Debian
I've tried and tried to figure this one out on myself, but I've failed, so I'll pose the question to LQ, and get the probably ultrasimple answer.
I'm trying to edit /boot/grub/menu.lst But any changes I make cannot be saved unless I'm in root. I might be doing this wrong, but I cannot log into root or figure out how to open this file as the root user. I'm still somewhat new to Linux, so could someone please give me an idiot-friendly step-by-step of what to do to open, edit, and save this file as a root user? Assume I've just booted Debian and logged in under my username. What do I do from here? |
open a terminal, type
Code:
su type Code:
nano /boot/grub/menu.lst |
Or "sudo nano /boot/grub/menu.lst". Or "gksu gedit /boot/grub/menu.lst". etc, along that line.
|
Use
su - the '-' gives you root's env as well. Incidentally, on a lot of systems, menu.lst is just a symlink; the real file is /boot/grub/grub.conf |
All times are GMT -5. The time now is 06:56 PM. |