LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 11-15-2003, 05:52 AM   #1
scammeh^
Member
 
Registered: Oct 2003
Location: Northampton, England
Distribution: MNF 8.2 SUSE 9.3
Posts: 32

Rep: Reputation: 15
need to edit!!!


what is the command in linux to edit or view a conf file?
Im running Mandrake Network Firewall and since it doesnt have a direct GUI interface i need the commands for the shell to edit shorewall and squid which it runs.

Can any1 help?

 
Old 11-15-2003, 05:55 AM   #2
comawhite
LQ Newbie
 
Registered: Sep 2003
Location: .SE
Distribution: Debian
Posts: 12

Rep: Reputation: 0
Well, you have a lot of different editors which you can use like vi, vim, emacs and so on, but if you are new to linux i would recommend to use pico or nano (not standards in most systems) but install one of them and then type nano/pico <the file you want to edit> and voilá!

Note: I dont know if this is the answer you are looking for but i wish u good luck!
 
Old 11-15-2003, 05:59 AM   #3
scammeh^
Member
 
Registered: Oct 2003
Location: Northampton, England
Distribution: MNF 8.2 SUSE 9.3
Posts: 32

Original Poster
Rep: Reputation: 15
cheers

Thanks! I will =]

because its MNF i dont think you can install any new editors, but im sure vim or something will do!!

Thanks for your help,

scammeh^
 
Old 11-15-2003, 07:14 AM   #4
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 11.10
Posts: 334

Rep: Reputation: 30
You could also check if mc is installed - (Midnight Commander) - try typing mc at the prompt, F3 to edit files...
 
Old 11-15-2003, 06:14 PM   #5
wahwah
LQ Newbie
 
Registered: Oct 2003
Location: Leiden, the Netherlands
Distribution: SuSE 8.2
Posts: 19

Rep: Reputation: 0
Hi,

you could try vi. It's on every system. It can be a bit tedious to use at first, but if you get it 'in your fingers' it's really a very useful editor.
Very very very short tutorial:
open a file
vi <filename> (if it doesn't exist, it's created now) <enter>
scroll through the file with either the arrow keys or with the h-j-k-l keys (left-down-up-right).
To insert text, type i (INSERT appears on the bottom line)
To delete text (one char at a time), you can use DEL on most systems, either in INSERT mode or noet inINSERT mode ... to stop editing, press ESC.
To save the file type (not in INSERT mode!)
:wq! (the : gives you a command prompt on the bottom line)
To exit without changing the file enter
:q!
Help with:
:help



To view a file you can use LESS.
less <filename><enter>
Scroll through the text with arrow keys or PGUP/PGDWN keys.
Exit with:
:q

Hope this helps.
There is also a more extensive builtin tutorial in vi. It takes about 30 min to complete and teaches you some more tricks (like search/replace and the like). You can enter this tutor in the help file:
:help
in the help file, scroll down until you find the tutor tag [tutor];
place your cursor on it and press ctrl-]
 
Old 11-16-2003, 07:27 AM   #6
scammeh^
Member
 
Registered: Oct 2003
Location: Northampton, England
Distribution: MNF 8.2 SUSE 9.3
Posts: 32

Original Poster
Rep: Reputation: 15
Talking

wow thanks!!

exactly what i need!

cheers guys!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I edit runlevels? rwescoat Linux - General 4 10-02-2004 09:23 PM
Anything I can use to edit flash? webwolf70 Linux - Software 1 10-02-2004 09:16 PM
edit plus enochemu Linux - Software 2 09-06-2004 06:37 AM
help vi edit tomamodi Linux - Newbie 1 08-13-2004 01:36 AM
Which do I need to edit? Do-Ping Linux - Software 4 04-04-2003 01:34 PM


All times are GMT -5. The time now is 02:16 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration