Files
bash.softwareshinobi.com/docs/Linux-Commands/Working-With-Files/039-the-nano-command.md
Software Shinobi 2b2c77b808
All checks were successful
learn org at code.softwareshinobi.com/bash.softwareshinobi.com/pipeline/head This commit looks good
automated terminal push
2025-06-04 20:16:44 -04:00

1.1 KiB
Executable File

The nano command

The nano command lets you create/edit text files.

Installation:

Nano text editor is pre-installed on macOS and most Linux distros. It's an alternative to vi and vim. To check if it is installed on your system type:

nano --version

If you don't have nano installed you can do it by using the package manager:

Ubuntu or Debian:

sudo apt install nano

Examples:

  1. Open an existing file, type nano followed by the path to the file:
nano /path/to/filename
  1. Create a new file, type nano followed by the filename:
nano filename
  1. Open a file with the cursor on a specific line and character use the following syntax:
nano +line_number,character_number filename

Overview of some Shortcuts and their Functionalities:

Shortcut Description
Ctrl + S Save current file
Ctrl + O Offer to write file ("Save as")
Ctrl + X Close buffer, exit from nano
Ctrl + K Cut current line into cutbuffer
Ctrl + U Paste contents of cutbuffer
Alt + 6 Copy current line into cutbuffer
Alt + U Undo last action
Alt + E Redo last undone action