Linux Node – Command Cheat Sheet
This is a collection of common commands often used when working with Linux Operating Systems (OS)
Linux Ubuntu is often the chosen OS when installing nodes for various reasons highlighted in some of our node basics documentation.
The purpose of this cheat sheet is to act as a go-to during the creation, installation and maintenance of nodes in general, it does not serve to be specific to any particular node. Please refer to specific node guides and supporting documents for specific commands per node operating.
Installation & Updating
Updating and installing new software on Linux is fairly straightforward. Most Linux operating systems will inform you if a Kernal update is available however you may need to keep to a specific version or be in complete control of all updates.
|Used to sync the package index files from |
their sources via the internet and download any updated ones
|The upgrade command is used to install the newest versions |
of all packages currently installed
|A safe way to update all dependent packages for other software, will check and update if other dependencies exist|
|Check the current Kernal version of Linux|
Root in Linux is much like the administrator on Windows, certain commands you will need to execute under sudo – you can also work within the root and all commands executed under root although you should only use and execute commands under root as required. You should not be logging in using root user!
|Used to execute a command under the privilege of the root user or superuser|
|This will switch you to the superuser/root account you can also switch to a different user account by giving the username after the su command such as |
|Provides you root shell and puts you into the home directory /root/|
Most hosting solutions will make standing up a VPS straightforward and provide you with the IP etc. The following commands can be used for diagnostics and fault finding such as checking if the host is listening on the specific port required by the node/adding a firewall rule.
|Provides all network interface configuration details|
|Provides eth0 details and IP address|
|Displays listening TCP/UDP ports on the host and their corresponding programme|
|Displays the network address of the hostname|
|Check the status of the firewall, this should return the status of the firewall either active or inactive|
|This command will enable the firewall on the Linux host and will provide your a response such as ‘Firewall is active’|
|If you need to disable the firewall, be aware with using this command will completely disable the firewall service running on the host|
|Allow a specific port to listen for incoming connections, you also need to specify the protocol such as TCP or UDP|
vim is a text editor on almost all Linux operating systems, it can be used when you need to edit a config file for example. Caution – VI editor can be quite daunting to new users, if you need to make a change to a file consider if you can edit this in word through SSH instead which would b a much easier option.
|Launches vi editor with the specified file|
|Quit editor without saving changes|
|Quit editor and save changes|
|Save the file currently being edited|
|Put the editor into edit/insert mode ‘Esc’ key will take you back out of editing mode and into normal mode|
Reboot / Power Down
|Will reboot the server (ubuntu)|
|Will reboot the server (ubuntu) and ignore any errors/messages it might throw|
|Will shut down the server (ubuntu)|
Master Nodes (MN)
Here are just a short collection of commands which are associated with general Master Nodes, specific commands will be added to setup guides as this will just remain as what is seen as common.
|This command needs to run with the specific MN in front of it which will then provide its status for example for a Deviant MN you would use: |
deviant-cli masternode status
|This command needs to run with the specific MN in front of it which will then provide the info regarding blocks etc for example for a Deviant MN you would use:|
|Provides the block to confirm if the node has the latest block and therefore up-to-date|