Commands in SSH console for CentOS 6.4

Blinky

Owner
Question:

Which one is the key combination to Save and Exit in CentOS 6.4. For example, when you editing a file and after that you need to save it somewhere.

If there is a place on Internet, where I can find them, please let me know. Thanks in advance.

Answers:

To edit a file in Linux distribution, all you need is a text editor. CentOS already comes with an installed text editor "vi". You can open text file with the "vi" <filename> command. To save the file you must combine Shift + you write w. Exiting from the text editor is similar - Shift + you write q (as a quite).

Text editors vi and vim are really easy to be used, but are not recommended for beginners, because of the fact, that the combinations to save, quite and etc. the file should be known well. Mus more simple editor is nano, but this is another package, which you should install. If you have the access to the root, you can install it like this - yum -y install nano. Writing you can do with an combination of Ctrl + O, after that Ctrl + X to exit. Those combinations are listed in the bottom of the page, while you editing the file by using nano. If you have any problems using those editors, you can always look up into user manual, with commands man nano & man vim.

For vim, you exiting the insert mode with ESC and after that you write :wq to save and exit at the same time. The editor is available in every distribution, if you have nano/pico ctrl+x and you will be asked to save on the old file, press Y and ENTER.
 
Advices:

One tip -install nano. It is much easier and the exit there is only with ctrl-x.

Yes, you can install nano. It is already mentioned why.

Код:
yum install nano

And another thing - One suppon a time in the DOS century people often used Norton Commander (NC) and it has an clone for Linux console Midnight Commander.


Legendary-File-Manager-Midnight-Commander-4-8-10-Released-with-Lots-of-Fixes-372980-2.png

Код:
yum install mc
And you can start it with mc

Hope you like it. Was translated from one interesting thread here.
 

Горе