To list running services with systemctl, you want to filter for services (--type=service) that are currently active (--state=running).
List ALL Active Services (Running or Exited): List ALL Installed Services (Running, Stopped, or Disabled) Finding a Specific Service The Cleanup Process Stop the service Disable…
bash
systemctl list-units --type=service --state=running
systemctl --type=service --state=runningList ALL Active Services (Running or Exited):
bash
systemctl list-units --type=serviceList ALL Installed Services (Running, Stopped, or Disabled)
bash
systemctl list-unit-files --type=serviceFinding a Specific Service
bash
systemctl --type=service --state=running | grep -i 'nginx\|apache'The Cleanup Process
Stop the service
bash
sudo systemctl stop your-service-name.serviceDisable the service
bash
sudo systemctl disable your-service-name.serviceDelete the service files
bash
sudo rm /etc/systemd/system/your-service-name.serviceReload the systemd manager
bash
sudo systemctl daemon-reloadReset failed states
bash
sudo systemctl reset-failedlinux-command/systemctl.md
Related articles
- Linux Commandnslookup is a command-line tool used to query DNS (Domain Name System). It lets you find the IP address of a domain, perform reverse lookups, and query specific DNS records.Query a specific DNS server Find the IP address (A record) Find IPv6 address (AAAA record) Find MX (Mail Exchange) records Find NS (Name Server) records Find TXT records
- Linux CommandCreate the user and home directory in arch linuxSet passworrd
- Linux CommandCurlCurl — notes from the Linux Command collection.
- Linux CommandDnslookupDnslookup — notes from the Linux Command collection.