How can I list all
enabled services from
I know running
systemctl command by itself lists all services, but I would like to only get the
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
systemctl list-unit-files | grep enabled will list all enabled ones.
If you want which ones are currently running, you need
systemctl | grep running.
Use the one you're looking for. Enabled, doesn't mean it's running. And running doesn't mean it's enabled. They are two different things.
Enabled means the system will run the service on the next boot. So if you enable a service, you still need to manually start it, or reboot and it will start.
Running means it's actually running right now, but if it's not enabled, it won't restart when you reboot.
man systemctl states:
The argument should be a comma-separated list of unit
ACTIVEstates. When listing units, show only those in the specified states. Use
--state=failedto show only failed units.
LOAD: Reflects whether the unit definition was properly loaded.
ACTIVE: The high-level unit activation state, i.e. generalization of
SUB: The low-level unit activation state, values depend on unit type.
Though you can also use this to only show
enabled units with:
systemctl list-unit-files --state=enabled
If a unit is
enabled that means that the system will start it on startup. Though setting something to
enabled doesn't actually also
start it so you will need to do that manually, or reboot the system after setting it to