DEV Community

Cover image for Basic Linux command (nano)
Cheulong Sear
Cheulong Sear

Posted on

Basic Linux command (nano)

nano is a small and friendly editor. It copies the look and feel of Pico, but is free software, and implements several features that Pico lacks, such as opening multiple files, scrolling per line, undo/redo, syntax coloring, line numbering, and soft-wrapping overlong lines.

nano command may not be pre-installed on all Linux distributions. To install it use

# Debian/Ubuntu
sudo apt install nano
Enter fullscreen mode Exit fullscreen mode

To use nano, just type nano

nano


ctl + o: to save
ctl + x: to exit

1


ctl + : to replace

2


ctl + j: to justify text
ctl + c: to show the location of the cursor

3


alt + a: set mark
alt + 6: to copy

4


ctl + k: to cut
ctl + u: to paste
alt + u: to undo
alt + e: to redo

5


ctl + d: to delete a character after cursor

6


nano +20 pizza.txt: open file with nano

7


nano -v pizza.txt: view only mode

8

Other useful command

ctl + r: to read file
ctl + w: to find
ctl + /: to go to line

Leave a comment if you have any questions.

===========
Please keep in touch
Portfolio
Linkedin
Github
Youtube

Top comments (0)