Text and processing
The vi command
The classic Unix editor. Almost always vim is its modern version.
Copy-ready examples
$ vi /etc/hostnameOpen a fileYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- To quit without saving: Esc, then :q! and Enter.
FAQ
How do I quit vi?
Press Esc and type :q! to quit without saving or :wq to save and quit.
Why does it ignore what I type?
It starts in normal (command) mode: press i to type and Esc to go back.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course