demo.service is no longer needed.
Stop it now and prevent it from starting at the next boot.
Which command is appropriate?
systemctl disable --now disables boot activation and stops the currently running unit.
Detailed explanation
systemctl disable --now demo.serviceCorrect. It disables automatic start and stops the service now.
systemctl enable --now demo.serviceIncorrect. enable --now starts and enables the service.
systemctl reload demo.serviceIncorrect. reload rereads service configuration without stopping or disabling.
systemctl is-enabled demo.serviceIncorrect. is-enabled only reports state.
Try it yourself
An example you can run in a temporary verification environment.
systemctl --help 2>&1 | grep -E -- 'disable|--now' | head -n 3Expected result
disableと--nowに関するhelp行Key points
- disable affects boot
- --now affects current state
- Opposite of enable
Notes
- Environment: systemd systemctl help / unit変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Protected account data
Sensitive authentication data stored separately from ordinary account records.
Service availability
Whether a service can start automatically or be activated on demand.
Packet filter
A host firewall rule set that permits or rejects network packets.