Green YGreck Guides FR
🐧 LinuxBeginner⏱ 10 min6 steps

Survive in nano and vim

Open, edit, save and quit.

  1. nano, the simplest:
    nano fichier.txt
  2. In nano: Ctrl + O saves, Ctrl + X quits, Ctrl + W searches.
  3. vim, present everywhere:
    vim fichier.txt
  4. In vim: press i to type, Esc to go back to command mode.
  5. Save and quit: type :wq then Enter. Quit without saving: :q! then Enter.
  6. To choose the default editor: sudo update-alternatives --config editor (Debian/Ubuntu).