---
title: 'Nano text editor | Zomro'
description: 'The editors vim and nano.'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/05/01/1653476766_1653476695419.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * Nano text editor 



# Nano text editor

23-05-2022

It often happens that you need to edit some text file located on a Linux server. Whether it's a configuration file (for example, _nginx.conf_) or a site file. There are several ways how this can be done. Of course, you can download the file from the server via _FTP_ or _SFTP_ , edit it and upload it back. In some cases, this is advisable. But you can use the existing editors in the system or install a new application in which you can make the necessary changes. You do not need to download a file in order to change or add 1-2 words.  
  
If you have installed Linux OS from our templates, 2 editors are already available for you to use: _nano_ and _vi/vim_. This article will focus on the _nano_ editor - a very simple editor that is accessible to a user of any level.  
  
If for some reason the _nano_ editor is not installed, then it can be installed by running the install command. For _rpm-based distributions_ :
    
    
    yum install nano

  
For _deb-based_ , the command is:
    
    
    apt-get install nano

  
To work with the program, you need to log into the server using the _SSH_ protocol. For example, on Windows, by installing the _PuTTY_ program, and on Linux or Mac, use the built-in _ssh_ program. Depending on the Linux system and the program you are using to connect to the server, copy and paste from your operating system's clipboard can be used. For example, you can paste text into _PuTTY_ using the **SHIFT+INS** combination, and copy it by simply selecting the text. Unfortunately, this does not work on all Linux distributions on the server.  
  
  
In order to start the editor, log in to the server via _SSH_ using any available client - built into your OS or, for example, _PuTTY_ and run the command:
    
    
    nano

  
To edit a specific file, specify the path to the file - full or relative:
    
    
    nano /path/to/file

  
Consider the appearance of the main editor window.

![Nano text editor - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/05/01/1653476766_1653476695419.png)

_Image 1. Appearance of the nano editor_

  
At the top of the window you can see the name and version of the program, the name of the file being edited and the path to it, the '*' (asterisk) icon, which indicates that changes have been made that have not been saved, as well as other service information. Next comes a large area with the contents of a text file. This is where the file is viewed and edited. At the bottom is a quick access bar that lists keyboard shortcuts for the most common commands.  
  
You can move through the text with the arrows, as well as with the **HOME** , **END** , **PG UP** , **PG DOWN** buttons.  
  
Here are some useful combinations and commands while working with the _nano_ editor. In older versions of the program, the combinations may differ.  
  
**CTRL+X** \- exit the editor. If changes were made that you did not save, you will be asked to save to a file.  
**CTRL+O** \- save file  
**CTRL+W** \- search by file  
**ALT+S** \- enable/disable word wrap (the letter S appears at the top right)  
**ALT+U** \- cancel action  
**ALT+E** \- repeat action  
  
Separately, I want to note text editing possibilities. You can select, cut, copy, paste. To select text, use the **ALT+A** combination. The character under the cursor is not included in the selection. When the desired fragment is selected, press **ALT+6** to copy or **CTRL+K** to cut, navigate to a new location and press **CTRL+U** to paste.  
  
For example, let's select the text (**ALT+A**).

![Nano text editor - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/05/01/1654012555_1654012530705.png)

Image 2. Text selection

  
Copy (**ALT+6**) and paste (**CTRL+U**) it several times (move cursor to desired location):

![Nano text editor - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a44@server-panel.net/2022/05/01/1654012470_1654012373810.png)

Image 2. Inserting text

For help with all the features of the _nano_ editor, use the combination **GTRL+G**. The program has some features that will help you work with scripts in different programming languages, as well as work with multiple files and much more.  


## Conclusion

The _nano_ editor is recommended for beginners as it is quite simple and straightforward. Editing text files is as easy as using Notepad in Windows.  


Similar articles:

[Introduction to CI/CD: Analysis of Development Methodology](https://zomro.com/blog/faq/437-znakomstvo-s-cicd-analiz-metodologii-razrabotki) [Installing the VestaCP panel](https://zomro.com/blog/faq/327-ustanovka-paneli-vestacp) [How to Install Node.js on Windows Server 2019](https://zomro.com/blog/faq/312-kak-ustanovit-nodejs-na-windows-server-2012-2016-2019) [VestaCP: Installing Wordpress in the console (from creating a domain to getting a ready site)](https://zomro.com/blog/faq/209-vestacp-ustanovka-wordpress-v-konsoli-ot-sozdanija-domena-do-poluchenija-gotovogo-sajta) [Performing site and database backups with a simple script through the scheduler](https://zomro.com/blog/faq/369-performing-site-and-database-backups-with-a-simple-script-through-the-scheduler)

[ Dedicated servers from €88.80/mon ](/dedicated-servers)
