Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Revision Cards

Getting Help and Editing Files (nano, vim)

Getting Help and Editing Files (nano, vim) nano and vim are text editors in the terminal. man shows help for a command. Ctrl+O then Enter = save. Ctrl+X = exit. Ctrl+W = search. vim has modes. Press i to type. Press Esc to stop typing. :wq = save and quit. :q! = quit without saving. Closing the term

Getting Help and Editing Files (nano, vim) nano and vim are text editors in the terminal. man shows help for a command. Ctrl+O then Enter = save. Ctrl+X = exit. Ctrl+W = search. vim has modes. Press i to type. Press Esc to stop typing. :wq = save and quit. :q! = quit without saving. Closing the term
Getting Help and Editing Files (nano, vim) · Download PNG
Read card text

What this card says

What it is

nano and vim are text editors in the terminal. man shows help for a command.

nano keys

Ctrl+O then Enter = save. Ctrl+X = exit. Ctrl+W = search.

vim basics

vim has modes. Press i to type. Press Esc to stop typing.

:wq = save and quit. :q! = quit without saving.

Common mistake

Closing the terminal when stuck in vim. Press Esc twice, then :q!.

Back up a config before editing: sudo cp file file.bak.

KeysAction
iEnter insert mode (start typing)
EscBack to normal mode
:wSave
:qQuit (:q! quit without saving)
:wq or ZZSave and quit

Learn more in the lesson: 5.9 Getting Help and Editing Files (nano, vim)

See all Ravi Sir's Cyber Security Cards