Nano Command Linux

Source: Internet
Author: User
Tags prev

Description of Use

Nano is a text editor of a character terminal, a bit like the editor program under DOS. It is much simpler than Vi/vim, which is more suitable for Linux beginners. The default editor for some Linux distributions is nano. (Nano-nano ' s another editor, an enhanced free Pico clone. It's not iPod Nano. The previous sentence was excerpted from the manual page of the Nano command, which I added later.

Common parameters

The Nano command opens the specified file for editing, and by default it automatically breaks lines, which are automatically split into rows when you enter too much content in a row, but handling some files in this way can be problematic, such as configuration files for Linux systems, Automatic line breaking will make the content that can only be written on one line broken into many lines, it is possible to cause the system is not the spirit. So, if you want to avoid this situation, add the-w parameter. (-W (--nowrap) = Disable wrapping of long lines.)

Format:nano-w FILE

You can add an alias to the end of the/etc/profile

Alias nano= "Nano-w"

After you save the login, you can let the shell automatically add this parameter for you, that is, the input Nano file is equivalent to nano-w file.

Using the example example one

[Email protected] ~]# nano-w TEST.BC

After the execution, a full-screen interface will appear. Note that the bottom two lines are hints for some shortcut keys.

GNU Nano 1.3.12 FILE:TEST.BC

123*321
123/321
scale=4;123/321

















^g Get help ^o writeout ^r Read File ^y Prev Page ^k Cut Text ^c Cur Pos
^x Exit ^j Justify ^w Where is ^v Next Page ^u UnCut Text ^t to Spell

Here are the tips for the bottom two lines. ^g means ctrl+g, just hold down the CTRL key and press G, then release, and so on.

^g Get Help

Exit ^x exit

^o Writeout Save

^j Justify

^r Read file reading files

^w Where is lookup string

^y Prev Page Prev

^k cut Text cut a whole line

^u UnCut Text Paste

^c Cur Pos
^v Next Page Next

^t to Spell

Interested can try it on their own, I generally still use Vi/vim.

Problem thinking related information

"1" Linux Treasury Nano Basic Guide

"2" Javaeye theme: Nano's Concise User Guide

"3" Becky Test storage Box Super Simple editor: Nano

Nano Command Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.