GO KALI FREE
Service Commands

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_name

Practical example

sudo systemctl disable bluetooth

Questions 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 enable

Enables a service to start automatically at boot time.

systemctl status

Shows the current status, recent logs, and PID of a systemd service.

systemctl restart

Stops and then starts a systemd service.

systemctl list-units

Lists all loaded and active systemd units (services, mounts, sockets, etc.).

systemctl stop

Stops a running systemd service immediately.

service

Legacy command to run SysV init scripts (works on both SysV and systemd).