LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Edit from Command Prompt (https://www.linuxquestions.org/questions/linux-general-1/edit-from-command-prompt-95538/)

Paul Mon 09-22-2003 11:35 AM

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.

Thanks

trickykid 09-22-2003 11:37 AM

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.

koyi 09-22-2003 11:39 AM

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

$ emacs -nw filename

druuna 09-22-2003 11:47 AM

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

:q

Take a look around and try out a few different editors before you get hooked on one.

joseph 09-22-2003 08:20 PM

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


All times are GMT -5. The time now is 11:05 PM.