Casbay Knowledge Base

Search our articles or browse by category below

Managing Services in Linux Based VPS Quick Guide

Last updated: September 7, 2022
Estimated reading time: 1 min

It is crucial to manage services and it can also be really difficult at times without the right tools. Most of the resources on a VPS are usually monitoring software to make resources easier to monitor. Services are programs that are running most of the in the background, which means they usually don’t have an interface. In this tutorial, you will be able to learn the basics of how to manage the services on Linux based VPS. The commands that are present in this guide are compatible with both CentOS and Ubuntu.

After understanding how to read the status of the services, it is time to learn how to manage them using some of the basic commands. Every service represents a different part of the software that works differently. For starters, we will begin with the start option and how to use them to start a service.

First, you will need to be connected to the server using SSH. Then, to start a service, use the following command below:

sudo systemctl start <service_name>

The service will start if it was correctly configured. To stop a specific, you may use similar such as shown in the following command.

sudo systemctl stop <service_name>

To inspect the status of a service, run the following command.

sudo systemctl status <service_name>

To enable a specific service to run on system boot, use the following command.

sudo systemctl enable <service_name>

Inversely, if you want to stop a specific service to run on system boot, use this command.

sudo systemctl disable <service_name>

Finally, to verify the port that is used by a service, use the netstat option. However, you will need to install it for both Ubuntu and CentOS before using it.

For Ubuntu’s netstat installation, run this command.

sudo apt install netstat-nat

For CentOS’s netstat installation, run this command.

yum install net-tools

After completing the installation, to verify the port using netstat, run the following command.

sudo netstat -plnt

You should be able to sell all the required network information in the output after running the command.

Was this article helpful?
Dislike 0
Previous: How to Install MetaTrader 5 in Windows VPS
Next: Yarn Installation On Linux VPS Server in 5 Steps
Discover the perfect balance of performance and budget-friendly Dedicated Server plan !
Discover the perfect balance of performance and budget-friendly Dedicated Server plan !
High performance and low cost Dedicated Server plan 128GB from $185 – upgrade today!
High performance and cheap Dedicated Server plan 128GB from $185 – upgrade today!