What | How |
---|---|
List services as calculated as being required for run state | systemctl list-units systemctl list-units --all systemctl list-units --all --state=inactive |
Start service at boot time | systemctl enable service |
List all services | systemctl list-unit-files |
Start service now | service service start systemctl start service |
Show unit file | systemctl cat service.service |
Show dependencies | systemctl list-dependencies service.service |
Show unit properties | systemctl show service.service systemctl show service.service -p Confilcts |
Masking (make service completely un-runnable) | systemctl mask service.service systemctl unmask service.service |
Editing | "snippet": systemctl edit service.service Full unit file: systemctl edit --full service.service |
[Unit] Description=Setup Ramdisk For Nagios After=network.target[Service] Type=oneshot ExecStart=/usr/local/sbin/setup-nagios-ramdisk RemainAfterExit=true ExecStop=/bin/true StandardOutput=journal[Install] WantedBy=multi-user.target
[Unit] Description=Nagios Core 4.4.6 Documentation=https://www.nagios.org/documentation After=network.target local-fs.target setup-nagios-ramdisk.service[...]