systemctl is used by most modern Linux distributions to start, stop, restart, enable, and inspect services. You will use it often when managing web servers, databases, bots, and game-server daemons.

CommandWhat it does
sudo systemctl status nginxShows whether a service is running and recent log lines.
sudo systemctl start nginxStarts a stopped service.
sudo systemctl stop nginxStops a running service.
sudo systemctl restart nginxStops and starts the service again.
sudo systemctl enable nginxStarts the service automatically when the VPS boots.
sudo systemctl disable nginxStops the service from starting automatically.

Replace nginx with the service you are managing. If a service fails to start, check its status output before repeatedly restarting it.

  • 0 Os usuários acharam isso útil
Esta resposta foi útil?

Artigos Relacionados

How to connect to a Linux VPS with SSH

SSH is the normal way to manage a Linux VPS. It gives you a terminal on the server so you can...

How to update packages on a Linux VPS

Keeping packages updated helps patch security issues and keeps server tools compatible. Run...

How to create a sudo user on a Linux VPS

A sudo user lets you manage a Linux VPS without logging in as root for every task. This is safer...

How to secure SSH on a Linux VPS

SSH is the main way to manage a Linux VPS, so it should be secured before the server is used for...

How to check disk usage on a Linux VPS

Disk usage issues can stop updates, backups, logs, databases, and game saves from writing...