Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit/save a file through Ubuntu Terminal

This is quite a simple question:

I just need to open a file (this filename is galfit.feedme). I can view the file with view galfit.feedme when I'm in the directory, but I do not know how to edit this file and then save the edit. How do you do that?

like image 867
vdogsandman Avatar asked Jul 08 '13 20:07

vdogsandman


People also ask

How do you edit the file in Linux and save it?

Once you have modified a file, press [Esc] shift to the command mode and press :w and hit [Enter] as shown below. To save the file and exit at the same time, you can use the ESC and :x key and hit [Enter] . Optionally, press [Esc] and type Shift + Z Z to save and exit the file.


1 Answers

Normal text editors are nano, or vi.

For example:

root@user:# nano galfit.feedme 

or

root@user:# vi galfit.feedme 
like image 107
Nick Anthony Paruta Avatar answered Oct 03 '22 22:10

Nick Anthony Paruta