Linux, .conf editing

Schwagoo

Junior Member
May 25, 2005
12
0
0
how do I go about editing conf files through the command line?

Server in question running CentOS, but it is probably the same for any linux box...

?
 

Vadatajs

Diamond Member
Aug 28, 2001
3,475
0
0
Originally posted by: keeleysam
nano is the best in the cli.

I used to think that too, then I found vimtutor. It should be installed alongside vim (vi improved, or some such). It explains how to use the editor. At the prompt, just type vimtutor, and it launches the tutorial.
 

TGS

Golden Member
May 3, 2005
1,849
0
0
VI, except for Gentoo I think it's the default text editor.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
first thing I install on gentoo is vim ;)

it's on the live cd (or one of them, I don't bother updating my livecd when I install gentoo).

I would go for vi, it's fairly easy to use. nano might be easier for some users, you could try it as well.
 

Zelmo3

Senior member
Dec 24, 2003
772
0
0
Originally posted by: P0ldy
nano -w file

Correct me if I'm wrong, but I think the -w switch for nano is now the default behavior (i.e., it will not wrap even if you don't throw the switch). At least it's been working that way for me.

Nano is probably easiest for someone new to CLI text editing because it uses the arrow keys for navigation.
Vi (or vim) is the text editor that the old pros swear by, so there must be something to it. I haven't used it just because I don't know how, but now that I know there's a vimtutor I might give it a try.

In either case, go into the directory with the file you want to edit and type the name of the editor you want to use followed by the name of the file you want to edit.
Example:
nano dosbox.conf
 

P0ldy

Senior member
Dec 13, 2004
420
0
0
Originally posted by: Zelmo3
Originally posted by: P0ldy
nano -w file

Correct me if I'm wrong, but I think the -w switch for nano is now the default behavior (i.e., it will not wrap even if you don't throw the switch). At least it's been working that way for me.
Wasn't aware. Thanks.