Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-22-2003, 11:35 AM   #1
Paul Mon
LQ Newbie
Registered: Sep 2003
Posts: 12

Rep: Reputation: 0
Edit from Command Prompt

Can anybody tell me the command for editing a file from the command prompt?
Please forgive me as I'm new to Linux.

Old 09-22-2003, 11:37 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 245Reputation: 245Reputation: 245
vi <filename>
pico <filename>

And many other command line text editors out there.. I'd suggest like I displayed above, learn vi and you can use pico for more user-friendliness.
Old 09-22-2003, 11:39 AM   #3
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
You can start emacs in a terminal, too with the "-nw" option, like this:

$ emacs -nw filename
Old 09-22-2003, 11:47 AM   #4
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
First you need an editor. There are too many to mention so I just give you a few that are commenly used (and probably installed during a normal install):

- vi (or vim, gvim)
- emacs
- joe
- jove

To edit a file from the command line:

vi <namefile> (Same for the other editors I mentioned).

You do need to know the specific 'editing codes'. These are different for just about every editor.

For vim you can do the following to get a quickstart

vi [enter]

When vi is started ('VIM - Vi IMproved' should be visible) type the following:

:help [enter]

to stop


Take a look around and try out a few different editors before you get hooked on one.
Old 09-22-2003, 08:20 PM   #5
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
try read a thread that started by trickykid "list of linux command from O'reilly"
It will help you


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM
Getting out of command prompt squirellplaying Linux - Newbie 8 05-05-2004 08:44 PM
Where do I edit the system wide command prompt? Brakki Linux - General 1 04-13-2004 12:02 AM
Command Prompt? eXdener Linux - Newbie 3 01-05-2004 04:38 PM
How to recall an old command at the command prompt? J_Szucs Linux - Newbie 9 03-07-2003 12:29 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:18 AM.

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