nano

  • Nano is freely available under the GPL for Unix and Unix-like systems.

  • It is a keyboard-oriented editor, controlled with key combinations, i.e. the "control" key (denoted by "^") PLUS certain letter keys.

Basic commands:

  • ^O : saves the current file

  • ^W : goes to the search menu

  • ^G : gets the help screen

  • ^X : exits

Basic Usage

  • Launch the editor by typing "nano" at the shell prompt. An overview of available commands is given at any time at the bottom of the editor screen.

nano
  • Open an existing file by typing "nano" followed by the file name.

nano file1.txt
  • If you modify the file, when you exit you will be asked whether to save the changes and the name of the file to save.

Advanced Usage

Find and replace in nano

  • While holding down Ctrl key, press \

  • Enter your search string at prompt and press return

  • Enter your replacement string at prompt and press return

  • Respond to "Replace this instance" option menu:

    • Y to replace current instance

    • N to skip current instance

    • A to replace all instances

  • Note: The search string can also be a regular expression.

Last updated

Was this helpful?