Linux Format

Control your services

-

Many popular distros have traditiona­lly used SysVinit for starting and controllin­g services. But this has now been replaced, in a somewhat controvers­ial fashion for some users, by a new system and services manager called Systemd. The Systemd service manager uses the systemctl command to control the services. If you enter the systemctl command into a terminal window it will to list the status of everything that is controlled by Systemd. If you follow this up with systemctl list-units -t service command, which will list the active services. You can check the status of any individual service with the systemctl status command, such as systemctl status sshd. service . Similarly, you can change the state of the service by replacing status with start , restart and stop . For example, sudo systemctl start sshd.service will start the service, if it isn’t already running. If you want a service to start at boot, you will need to use the enable option, such as sudo systemctl enable sshd.service Similarly, the command sudo systemctl disable sshd.service disables it from starting at boot. You can also use systemctl to power cycle the computer. The command for this is systemctl poweroff which will power down the system and systemctl reboot will restart it.

Newspapers in English

Newspapers from Australia