🔧 How do I restart a service on Linux?

Help with VPS, service, network, Linux, Nginx and WordPress problems and system administration.
rychy
Site Admin
Мнения: 132
Регистриран на: Вто Окт 20, 2026 10:45 am

🔧 How do I restart a service on Linux?

Мнение от rychy »

🇧🇬 Прочети на български

You often need to restart a service on your VPS. Here are the most common commands:

Basic commands

Restart a service:

systemctl restart service-name

Stop:

systemctl stop service-name

Start:

systemctl start service-name

Check the status:

systemctl status service-name

Most common services

| Service | Command |

|--------|---------|

| Nginx | systemctl restart nginx |

| Apache | systemctl restart apache2 |

| MySQL | systemctl restart mysql |

| PHP-FPM | systemctl restart php8.3-fpm |

| SSH | systemctl restart ssh |

Start automatically after a reboot

systemctl enable service-name

View the logs after an error

journalctl -u service-name -n 50

Any questions? Write here!