vi
EditorsFundamentals In real LinuxThe classic editor, available almost everywhere
Name: vi = visual (as opposed to the line editor ex)
This command needs a real Linux system; you can practise it in real Linux mode.
Description
vi is the classic full-screen Unix editor, present on practically every Unix-like system, even minimal servers and rescue environments. On most Linux distributions vi is really vim (or a small build of it).
Syntax
vi [FILE]...Common options
| i / Esc | Insert mode / normal mode |
| :wq | Save and quit |
| :q! | Quit without saving |
| x / dd / u | Delete a character / a line / undo |
| /word | Search for word (n for the next) |
Examples
$ vi /etc/hosts
Edit a file (vi is usually vim)
Explain