Usually when you are remoting your server via SSH or Telnet, you are dealing with command interface and almost every configuration in your server needs a text file be edited, so one of the most useful tools everyone needs for server administration, configuration and maintenance is a text editor that works within command interface.
Base on thegeekstuff.com poll , top 5 best linux text editors are Vim, gEdit, Nano, gVim, Eclipse and Emacs as shown in the chart below:
Although Vim is so popular among sysadmins, but i prefer to use Nano for my daily routine works, though for serious text editing like programming Vim would be better choice due to the various features which can be handy while dealing with large text files.
Opening a text file in Nano is almost like every other command-line text editor:
To save the file after editing, you can press Ctrl+x to exit as it has described in the lower part of the editor
You can install Nano on your linux simply by using install commands such as YUM :
yum install nano
when a file is open by Nano, you can use arrow-keys on your keyboard to navigate, or if you want to move faster through the pages, you can use
To use Vim, you can use the official Vim website in order to learn how you should operate with it. Two very basic actions:
Opening a file:
To start inserting texts, you should switch to “Insert Mode” by pressing i on your keyboard. to get out of “Insert Mode” just press Esc button.
Closing the opened file without saving type this in Normal Mode :
Closing the Opened file with saving type this in Normal Mode :