Windows sc query equivalent in Linux
Shows all installed services and whether they are running, stopped, or failed.
sc query
systemctl list-units
systemctl list-units
systemctl list-units
Overview
What this command does
On Windows, "sc query" is used to list all services and their status. On Linux, the closest practical mapping shown here is "systemctl list-units". Shows all installed services and whether they are running, stopped, or failed. This reference is grouped under Services & Processes → Services.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows sc query maps to systemctl list-units for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux services and processes.
Practical tasks
Common use cases
List all services and their status
Shows all installed services and whether they are running, stopped, or failed.
systemctl list-units --type=service
All active services
systemctl list-units --state=failed
Failed services only
systemctl list-unit-files
All installed services + enabled status
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
systemctl list-units --type=service
systemctl list-units --state=failed
systemctl list-unit-files
systemctl list-units --type=service | grep ssh
Walkthrough
Examples with explanations
# Windows: sc query type= all
systemctl list-units --type=service # running services
systemctl list-units --state=failed # what's broken?
systemctl list-unit-files # all + boot status
# Filter by name:
systemctl list-units --type=service | grep ssh
Reference
Common options and variations
| Command or option | Use |
|---|---|
systemctl list-units --type=service | All active services |
systemctl list-units --state=failed | Failed services only |
systemctl list-unit-files | All installed services + enabled status |
service --status-all | Old-style service list |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
The command "systemctl list-units" is the same in all three rows, while package or base details differ: Debian/Ubuntu uses apt + systemd; Fedora uses dnf + systemd; Arch uses pacman + systemd.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | apt + systemd | systemctl list-units |
Same systemctl/journalctl syntax on systemd-based Debian and Ubuntu systems. |
| Fedora | dnf + systemd | systemctl list-units |
Same command syntax; service names can differ by package. |
| Arch | pacman + systemd | systemctl list-units |
Same command syntax; enable services explicitly after package installation. |
Keep learning