The VPS Manuals
Over the next few months we’ll be posting a series of detailed tech manuals on our blog, to help you get the most of your VPS products…
How to Read the Manuals
A certain format is followed through all the manuals. In this article the basics of the wiki are described.
What the Colours Mean
While most parts of manuals should be understood literally, phrases in red stand for example parameters, which have to be customized by the user.
Phrases in gray are what you type or see in a Terminal window.
Get to Terminal
Terminal is an interface in GUI (graphical user interface), where you can type and execute text based commands. During the server configuration it will be your main tool. A way to launch Terminal varies on different systems.
In Centos 7: click in the uppermost panel menu Applications, choose Utilities, then Terminal.
In Ubuntu 14.04: In the upper-left corner click on “Search your computer and online sources” button, then type in “Terminal” – it would found you an application, click on it
Shortcut: pressing the combination of Ctrl + Alt + T works in both systems.
Commands
In the manuals at the beginning of each command you see a notation – either # or $:
# – the following command has to be executed with root (super user) privileges. Either you have to be logged in as root or to type “sudo” in front of the command. Example:
$ sudo passwd yolkin
This is the most common way to configure a server – using sudo.
$ – the following command could be executed with privileges of any user that could log in to the system
Current User
In Terminal you always see which user you are logged in with. It is written in the line with type prompt:
[johndoe@localhost ~]$ you are logged in as johndoe and commands will be executed as of this user
[root@localhost ~]# you are logged in as root and all commands will run with super user privileges
If you want to log in as another user – type command su and user name:
$ su name-of-the-user
In most cases you will be asked to type in a password to log in.
Save and Exit command for Terminal based text editors
F3 Enter F2 for nano
:wq! – vi
Terminal Based Text Editors
Through server configuration you will be editing files containing text information. There are two text editors commonly used for this purpose – “vi” and “nano”. You could define, which you are using by their look. Screenshots and descriptions are below.
Nano
Vi
How to Edit Text
In nano: put your cursor at the place you want to type and go on editing
In vi: once you have opened the file, press i to get into insert mode. Then again put your cursor to the needed place and start typing
How to Save the Document and Exit from Editor
In nano: press F3 for save. Type in the location where you want to save the file or leave it as it is. Press Enter. Your document is saved now. Press F2 to exit the editor.
In vi: once you finished with text editing, press Esc. Now type in “:wq!” to save the document and exit from editor