Stage 2 · Lesson 9 of 9
Editing files in the terminal: nano and Vim
On a server there is usually no , so you need a , one that runs inside the terminal. nano is the simplest. Its shortcuts are listed along the bottom: Ctrl+O saves and Ctrl+X exits. Vim (or vi) is installed almost everywhere and is powerful, but it has modes.
You start in , where keys are commands. Press i to insert text, Esc to go back, then type :wq to save and quit, or :q! to quit without saving. opens an editor for some commands, so you will meet one sooner or later. Run vimtutor for a 30-minute guided lesson.
Common trapbeing stuck inside Vim with no idea how to leave, so learn the exit commands before you need them.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT's lectures on the shell and shell tools, with exercises after each one
- BookFreeThe Linux Command Line
William Shotts · Beginner
A free book that explains the shell step by step; the first part covers this whole stage
Practise
Keep handy
Also worth your time
- roadmap.sh: Shell / BashGo deeper
The full map of shell and Bash topics, to see what comes after the basics