LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-16-2010, 05:47 PM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
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?
 
Old 03-16-2010, 05:50 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
open a terminal, type
Code:
su
and give the root password
type
Code:
nano /boot/grub/menu.lst
make the changes and safe the file.
 
1 members found this post helpful.
Old 03-16-2010, 07:34 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Or "sudo nano /boot/grub/menu.lst". Or "gksu gedit /boot/grub/menu.lst". etc, along that line.
 
1 members found this post helpful.
Old 03-16-2010, 08:14 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
read-only file system error when editing a config file smallfrowne Linux - Newbie 5 02-19-2008 06:06 PM
editing a very large HTML file (or, extracting URLs from a file) Chriswaterguy Linux - Software 3 11-27-2007 06:07 PM
Editing files owned by root SiW Programming 5 07-31-2007 01:36 PM
Editing of any file in /etc directory will disturb our root login? Karthi_India Linux - Newbie 2 07-14-2007 10:24 PM
editing in root problem anvil1 SUSE / openSUSE 9 04-07-2005 09:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration