Linux Commands Helper
💬 Your AI-powered Linux assistant
service Command - Run a System V Init Script
The service command is used to run System V init scripts. It is commonly used to start, stop, restart, and check the status of system services on older Linux distributions or those not using systemd.
Syntax
service [service] [command]
Examples
sudo service ssh restart
Restart the SSH service.
sudo service apache2 status
Check the status of the Apache2 service.
Notes
- service is mainly used on SysVinit-based systems; on systemd systems, use
systemctl
instead. - Requires root privileges for most operations.
- For more options, see
service --help
or the man page.