In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what is the use of the nano command in Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Linux common command nano is a character terminal text editor, a bit like the editor program under DOS. It is much simpler than vi/vim and is more suitable for beginners of Linux. The default editor for some Linux distributions is nano.
Nano character Terminal text Editor
Additional note nano command can open the specified file for editing, by default it will automatically break the line, that is, in a line of too long content automatically split into several lines, but in this way to deal with some files may cause problems, such as Linux system configuration files, automatic line breaking can only be written on one line of content broken into multiple lines, may cause the system malfunction. So, if you want to avoid this, add the-w option.
Syntax nano [option] [[+ row, column] file name]. Option-h, -?-- help displays this information + line Columns start with the number of columns and rows specified-A-- smarthome enables intelligent HOME key-- B-- backup stores backups of existing files-C-- directory where backupdir= stores unique backup files-D-- boldtext Replace color inversion with bold-E-- tabstospaces converts entered tabs to blank-F-- multibuffer enables multiple file buffers-H-- historylog records and reads search / replace history strings-I-- ignorercfiles Do not refer to the nanorc file-K-rebindkeypad fixed numeric keypad keypad confusion-L-nonewlines do not add line breaks to the end of the file-N-noconvert do not convert from DOS/Mac format-O-morespace use one more when editing Line-Q-- quotestr= reference represents string-R-- restricted restriction mode-S-- smooth scrolls by line instead of half screen-T # columns >-- tabsize= sets custom table width to # columns-U-quickblank status line flash Move-V-- version displays version information and leaves-W-- wordbounds detects word boundaries more correctly-Y-- syntax= syntax definition for highlighting-c-- const continues to display cursor position-d-- rebinddelete Fixed confusion of backspace / delete keys-I-- autoindent indents new lines automatically-- k-- cut cuts from cursor to end of line-- l-- nofollow do not follow symbolic links Instead, override-m-mouse enable mouse function-o-operatingdir= set operation directory-p-preserve reserve XON (^ Q) and XOFF (^ S) keys-Q-- quiet silently ignore startup problems For example, rc file error-r # columns >-fill= sets line break width to # columns-s-speller= enables alternative spell checker-t-- automatically saves when tempfile leaves Do not prompt-u-- undo allows GM to undo [experimental features]-v-- view view (read-only) mode-w-- nowrap do not automatically wrap-x-- nohelp do not display auxiliary areas -z-- suspend enable pause function-$--softwrap enable soft line wrapping-a -b,-e,-f,-g,-j (ignore To be compatible with pico) use cursor control
Move the cursor: use to move with the arrow keys.
Select text: hold down the left mouse button and drag to.
Copy, cut, and paste
Copy a whole line: Alt+6
Cut and paste a whole line: Ctrl+K
Paste: Ctrl+U
If you need to copy / cut multiple lines or part of a line, first move the cursor to the beginning of the text you want to copy / cut and paste, press Ctrl+6 (or Alt+A) to mark it, and then move the cursor to the end of the text to be copied / clipped. At this point, the selected text will be highlighted, copied with Alt+6 and cut and pasted by Ctrl+K. To cancel during text selection, simply press Ctrl+6 again.
Search
Press Ctrl+W, then enter the keyword you want to search, and press enter to confirm. This will navigate to the first matching text, and then you can use Alt+W to locate the next matching text.
Turn the page
Ctrl+Y to previous page
Ctrl+V to the next page
Save
Use Ctrl+O to save your changes
Quit
Press Ctrl+X
If you make changes to the file, you will be asked if you need to save the changes. Enter Y to confirm saving, enter N to not save, press Ctrl+C to cancel to return. If you enter Y, the next step will ask you to enter the file name you want to save. If you do not need to change the file name, enter directly; if you want to save to another name (that is, save as), enter the new name and confirm it. You can also use Ctrl+C to cancel the return at this time.
This is the end of this article on "what is the use of nano commands in Linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.