service Linux Command
Legacy command to run SysV init scripts (works on both SysV and systemd).
What does service do?
Legacy command to run SysV init scripts (works on both SysV and systemd).
Syntax
service service_name actionPractical example
sudo service networking restartRelated Service Commands
systemctl list-unitsLists all loaded and active systemd units (services, mounts, sockets, etc.).
journalctlQueries and displays logs from the systemd journal.
systemctl statusShows the current status, recent logs, and PID of a systemd service.
systemctl startStarts a systemd service immediately.
systemctl disableDisables a service from starting automatically at boot.
systemctl stopStops a running systemd service immediately.