Where to start First steps track · 15 stages
Linux Labs

nano — a simple console editor

cheat sheet · GNU nano https://lab.dimsanych.ru/en/wiki/nano/

Cheat sheet

  • nano file open/create a file
  • sudo nano /etc/hosts edit a system file
  • nano +25 file open positioned at line 25
  • nano -w file don't wrap long lines
  • Ctrl+O save Ctrl+X quit
  • Ctrl+W search Ctrl+\ replace
  • Ctrl+K cut a line Ctrl+U paste Ctrl+6 select

Options

set linenumbers          # line numbers
set tabsize 4
set tabstospaces         # tabs become spaces
set constantshow         # always show the cursor position
include "/usr/share/nano/*.nanorc"   # syntax highlighting

Globally — /etc/nanorc. Highlighting for many formats works out of the box.

Loading…