cmdxray / commands / nano

What does nano do?

a simple, friendly terminal text editor.

▸ Explain your own nano command →

nano examples, explained

$ nano file.txt

  • nanoa simple, friendly terminal text editor
  • file.txtan argument passed to the command

$ nano -l main.c

  • nanoa simple, friendly terminal text editor
  • -lshow line numbers in the left margin
  • main.can argument passed to the command

$ nano -w /etc/hosts

  • nanoa simple, friendly terminal text editor
  • -wdon't hard-wrap long lines
  • /etc/hostsan argument passed to the command

nano flags & options

-lshow line numbers in the left margin
-iautomatically indent new lines to match the previous one
-menable mouse support
-wdon't hard-wrap long lines
-cconstantly show the cursor position
-Bsave a backup of the previous version of the file
-Suse smooth (line-by-line) scrolling
-Tset the width of a tab in columns
-rhard-wrap lines at this column
-Yuse this syntax-highlighting definition
-vopen the file in view (read-only) mode

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.