Lessons
10Edit files with nano
0 of 5 tasks

Lesson 10 · about 12 min · 5 tasks

Edit files with nano

Open, change and save any file without leaving the terminal.

step 1 of 6

Open a file

Sooner or later you’ll need to change a file on a computer where all you have is a terminal: a setting on a server, a note, a script. nano is the friendliest editor for that. Give it a file name:

$ nano notes.txt

The file opens and you can type straight away. Move around with the arrow keys; the mouse doesn’t work.

The bottom two lines list the shortcuts. ^ means Ctrl, so ^X Exit means Ctrl + X.

Your turn, in the terminal

  • Open notes.txt in nano
mapfolders appear as you explore
/ …
home/ …
you/◂ you are here
nowOpen notes.txt in nano
terminal
Practice terminal. Nothing you do here touches your real computer.
Type help to see what it understands.
you@terminal-mastery:~$