Just read here how to edit files using Nano. However, there is a big amount of software are available to edit files in Linux command line. By the way, I will try to tell you about Nano. Because Nano is a simple way to edit files in SSH.
While edit files using Nano make sure you are connected to your server via SSH. However, if you face difficulty then you can read our tutorial: Login VPS Via SSH.
Because I am already logged in so I am proceeding to the next option. Just enter a password to see the current directory and the files in this directory.
Edit Files Using Nano
Now see how to edit files using Nano editor? Furthermore, you are also seeing that we are in testa folder and here only three files are available. Which are file1.txt, file2.txt and file3.txt. Now if you want to edit file2.txt then run the below command.
email@example.com [~/testa]# nano file2.txt
When you will run this command then the file will open and also load the content of this file.
While looking at the top of this editor then you are seeing the version of nano and the file name. Either file is blank because there is nothing in the file. Below the list of commands which are acceptable by nano editor.
However, in nano, there is no option to use the mouse for clicking on any option. So if you want to use another editor then you have a choice.
Now if you want to run the bottom commands then holding down Ctrl button of your keyboard. For example, if you want to run “Write Out” command. Then press CTRL+O. Lastly, if you want to exit then press CTRL+X button.
You have read about how to edit files using Nano? If you face any difficulty to edit files using nano then submit a comment in the comment section.