↑ ↓ select, Enter open, Esc close

Restart a service and check the result

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
root@server
systemctl restart php8.2-fpm && systemctl is-active php8.2-fpm

Restarts the service and then reports active if it is running. If the restart fails, the error message from systemctl appears instead. The service is briefly unavailable during the restart.

Note: Many services support systemctl reload, which rereads the configuration without interruption. Before restarting Apache or nginx, test the configuration with apachectl configtest or nginx -t. Plesk’s own PHP versions are named plesk-php82-fpm and so on.

Also searched as

  • restart a service
  • restart nginx
  • restart service and verify
  • is the service running after restart

Related one-liners

All in systemd

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.