GO KALI FREE
Service Commands

systemctl list-units Linux Command

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

What does systemctl list-units do?

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

Syntax

systemctl list-units [options]

Practical example

systemctl list-units --type=service --state=running

Questions about systemctl list-units

How do I list all running services?

Use `systemctl list-units --type=service --state=running` to see all services that are currently running.

How do I list all failed services?

Use `systemctl list-units --type=service --state=failed` to see services that are in a failed state.

How do I list all services?

Use `systemctl list-units --type=service` to see all loaded service units regardless of state.

How do I list all unit types?

Use `systemctl list-units` to see all unit types (services, sockets, mounts, etc.). Use `--type=TYPE` to filter.

How do I see loaded vs active units?

Use `systemctl list-units` for loaded units, `systemctl list-units --state=active` for active only, or `--state=running` for running only.

How do I list all enabled services?

Use `systemctl list-unit-files --type=service --state=enabled` to see all services configured to start at boot.

How do I list service dependencies?

Use `systemctl list-dependencies service_name` to see what services depend on or are required by a service.

How do I see socket units?

Use `systemctl list-units --type=socket` to see all socket units that are currently loaded.

Related Service Commands

systemctl status

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

service

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

systemctl disable

Disables a service from starting automatically at boot.

journalctl

Queries and displays logs from the systemd journal.

systemctl enable

Enables a service to start automatically at boot time.

systemctl start

Starts a systemd service immediately.