Re: edit text files as root
kamaraju kusumanchi wrote:
> According to
http://kudos.berlios.de/kf/kisimlar/tipsntrix.html#rootedit
> , In Ubuntu one can edit the text files as root using the "Edit as
Root"
> option. But I could not find this option in Debian unstable KDE 3.5.2
.
> How can I achieve this behavior in Debian as well?
>
> thanks
> raju
>
> --
I do NOT have this down to a science, so I hope someone will please
correct my mistakes (if any)
Some info about my setup and kernel;
$ uname -a
Linux localhost 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686
GNU/Linux
I'm using KDE 3.3.2 on Debian Sarge (GNOME is installed as well)
You can just open Konsole, or any Terminal, and type in;
$ sudo nano /path/to/filename
e.g.;
$ sudo nano /etc/fstab
you will likely be prompted for the root passwd, which you must enter
-- there will be NO INDICATION (such as asterisks) as you are typing
the passwd. It works this way!
see 'man sudo' and 'man sudoers'
'sudo' means SuperUser DO - and use /sudo su/ to *remain* as superuser
throughout the shell session.../sudo/ without /su/ will allow superuser
on a once-per-command basis.
and you can replace *nano* with any other text editor I suppose (vi,
vim, pico, etc(?))...I'm still a bit unclear as to "which" editors are
available for Terminal use (perhaps 'curses' and 'ncurses' based
editors only(?)), ....and which are all GUI only (Kate, KWrite, KEdit).
.
Note that editors such as 'nano' and 'vi' are even available in a VT/VC
(Virtual Terminal / Virtual Console) - these are the TTYs located on
Ctrl+Alt+F1[2,3,4,5,6] usually -- whereas Ctrl+Alt+F7 usually brings
you Back to your orig X Windows session (GUI)...this can all be
altered/customized too.
It would be necessary to learn how 'vi' works in order to edit the
/etc/sudoers file using the command;
$ visudo
-- see 'man sudoers' which MUST be edited this way. I like 'nano' for
overall editing of text and config files from the terminal, it's easy
to learn and use.
I could ramble more - but that's a start :-)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply to: