Text and processing

The vi command

The classic Unix editor. Almost always vim is its modern version.

Syntax

vi [archivo]Try it in the terminal →

Copy-ready examples

$ vi /etc/hostnameOpen a file

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • To quit without saving: Esc, then :q! and Enter.

Related commands

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.

More Text and processing commands

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