Service & System

service

Run SysVinit scripts — legacy interface for starting and stopping services.

Synopsis

syntax
service SCRIPT COMMAND

Examples

Start nginx
sudo service nginx start
Restart nginx
sudo service nginx restart
List all services and their status
service --status-all
Check nginx status
service nginx status

Common options

FlagDescription
startStart the service
stopStop the service
restartRestart the service
statusShow service status
--status-allShow status of all services

About service

The `service` command run SysVinit scripts — legacy interface for starting and stopping services. Service and system commands manage daemons, scheduled tasks, system boot, and shutdown operations.

Modern Linux distributions use systemd for service management, though some still support SysVinit scripts. Understanding these commands is essential for deploying and maintaining production services.

The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man service`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Service & System Commands

Other commands in the Service & System category

Related tools