Computer Tips - systemctl: enable and start / disable and stop in one command

Date: 2020sep21 OS: Linux Keywords: systemd Q. systemctl: enable and start / disable and stop in one command A. Use the --now option
systemctl enable --now <service> = systemctl enable <service> = systemctl start <service>
systemctl disable --now <service> = systemctl disable <service> = systemctl stop <service>
The man page on --now says: When used with enable, the units will also be started. When used with disable or mask, the units will also be stopped. The start or stop operation is only carried out when the respective enable or disable operation has been successful.