Nano is a popular, easy to use terminal-based text editor installed to all Linux systems by default.
Nano provides a simple way to edit files via the terminal, without the need to download the file or use a separate FTP connection. The file can simply be edited directly through SSH.
Using Nano
Execute Nano
nano /path/to/fileREPLACE: /path/to/file with the path to the file you'd like to edit.
TIP: You may also create a new file by specifying a path to a file that does not exist.- While the mouse can not be used to browse the file, keyboard input is used instead
- Use the arrow keys to navigate the file
- The page up, page down, home, and end keys are useful for quickly navigating files
- Text may still be copied and pasted by using the mouse
- To copy, use the mouse to highlight the text you'd like to copy
- Press the right mouse button after highlighting the text
- Use the keyboard to navigate where you'd like to paste the text to
- To Paste, press the right mouse button while no text is highlighted
NOTE: This will paste whatever is in your computer's regular clipboard. The clipboard is not confined to the terminal. Text can be copied from a website, notepad file, email, etc. and pasted into the terminal, or vice versa.
- To copy, use the mouse to highlight the text you'd like to copy
- All other editing is done like any other text; typing, using the enter/return key for new lines, and backspace/delete keys to delete characters.
- When done editing, press CTRL+X to exit the file
- If any changes were made, a prompt will appear at the bottom asking if you want to save
- Press Y to save the file
- Press N to discard changes
- If saving, a prompt will appear asking for the file name to save as
- Press enter to save the file with the existing name, overwriting the original file
- Delete the original file name with the backspace key and type a new file name, then press enter if you'd like to save as a new file
- If any changes were made, a prompt will appear at the bottom asking if you want to save
Comments
0 comments
Article is closed for comments.