Next it will ask for the term you want to replace the searched items with. If you want to replace the searched term, use Ctr+\ keys and then enter the search term and press enter key. You can also use regex for the search terms. To go to the next match, use Alt+W keys.īy default, the search is case-insensitive.
If you want to search for a certain text, use Ctrl+W and then enter the term you want to search and press enter. You can repeat these key combinations to undo or redo multiple times. You can undo and redo your last actions using: Undo or redo your last actionĬut the wrong line? Pasted the wrong text selection? It’s easy to make such silly mistakes and it’s easy to correct those silly mistakes. No need to paste it and the selected text will be deleted (in a way). Set the marker and move the arrow to select a portion of text. If you want to delete multiple lines, you may use Ctrl+K on all of them one by one.Īnother option is to use the marker (Ctrl+a). If you don’t paste it anywhere, it’s as good as deleting a line. You can also use the Ctrl+K keys that cuts the entire line. Press them repeatedly or hold them to delete multiple characters. You may use the Backspace or Delete key to delete one character at a time. There is no dedicated option for deletion in Nano. Once you have copied or cut the selected text, you can use Ctrl+U to paste it. Once you have selected the desired text, you can Alt+6 key to copy the selected text or use Ctrl+K to cut the selected text. Now use the arrow keys to highlight the selection. Move your cursor to the beginning of the text you want to copy. Nano also provides its own shortcuts for cutting and pasting text but that could become confusing for beginners. Nano specific shortcuts for copy and pasting Similarly, you can use the right click and select paste from the menu or use the Ctrl+Shift+V key combination. You may also use the Ctrl+Shift+C keyboard shortcut in Ubuntu terminal. Select a text with mouse and then use the right click menu to copy the text. If you don’t want to spend too much time remembering the shortcuts, use mouse. Jump to a specific line in Nano Cut, copy and paste in Nano editor This will show you some options you can use at the bottom of the editor. If you want to go a specific location like last line, first line, to a certain text, use Ctrl+_ key combination. Ctrl+Y/Page Up and Ctrl+V/Page Down keys can be used to scroll by pages. You can use the Home key or Ctrl+A to move to the beginning of a line and End key or Ctrl+E to move to the end of a line. Use the arrow keys to move up and down, left and right. When you exit the editor using Ctrl+X keyboard shortcut, you’ll be asked whether you want to save your modified text to the file or not. Nothing is saved immediately to the file automatically unless you explicitly do so. It is almost like using a regular text editor, at least for writing and editing.Īs soon as you modify anything in the file, you’ll notice that it reflects this information on the editor. There are no special insert mode or anything of that sort. You can start writing or modifying the text straightaway in Nano. You may also open a new file without any name (like new document) with Nano like this: nano Basic editing If the file doesn’t exist, it will still open the editor and when you exit, you’ll have the option for saving the text to my_file. You can open a file for editing in Nano like this: nano my_file Open or create a file for editing in Nano
When it says “M-U Undo”, it means use Alt+U key to undo your last action. When it says “^X Exit”, it means to use Ctrl+X keys to exit the editor. You should get familiar with the symbols in Nano. The wider your terminal window, the more shortcuts it shows. This way you won’t get stuck at exiting the editor like Vim. Nano editor also shows important keyboard shortcuts you need to use for editing at the bottom of the editor. You can start writing or editing text straightaway.
If you’ve ever used Vim or Emacs, you’ll notice that using Nano is a lot simpler. Getting familiar with the Nano editor interface
#KALI LINUX HOW TO USE NANO INSTALL#
If not, please your distribution’s package manager to install it. I presume that you have Nano editor installed on your system already.