systemctl disable Linux Command
Disables a service from starting automatically at boot.
What does systemctl disable do?
Disables a service from starting automatically at boot.
Syntax
systemctl disable service_namePractical example
sudo systemctl disable bluetoothQuestions about systemctl disable
How do I disable a service at boot?
Use `sudo systemctl disable service_name` to prevent the service from starting automatically when the system boots.
What is the difference between disable and stop?
`disable` prevents auto-start at boot. `stop` halts the service now. A disabled service can still be started manually.
How do I disable and stop a service?
Use `sudo systemctl disable --now service_name` to disable at boot and stop immediately in one command.
How do I check if a service is disabled?
Use `systemctl is-enabled service_name` to check. Returns 'disabled' or 'enabled' depending on the current state.
How do I re-enable a disabled service?
Use `sudo systemctl enable service_name` to re-enable a previously disabled service.
How do I list all disabled services?
Use `systemctl list-unit-files --type=service --state=disabled` to see all services that are currently disabled.
How do I permanently remove a service?
Disable it first, then remove the service file: `sudo systemctl disable service_name && sudo rm /etc/systemd/system/service_name.service && sudo systemctl daemon-reload`.
How do I reset a service to default state?
Use `sudo systemctl reenable service_name` to disable and re-enable a service, resetting its symlinks.
Related Service Commands
systemctl enableEnables a service to start automatically at boot time.
systemctl statusShows the current status, recent logs, and PID of a systemd service.
systemctl restartStops and then starts a systemd service.
systemctl list-unitsLists all loaded and active systemd units (services, mounts, sockets, etc.).
systemctl stopStops a running systemd service immediately.
serviceLegacy command to run SysV init scripts (works on both SysV and systemd).