Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Linux >> RHEL >> 7 >> commands >> systemctl >> Examples of systemctl command usage

 

Purpose command
List all services and their states systemctl list-unit-files --type service
Enable a specific service to auto start on boot e.g. httpd.service systemctl enable httpd.service
Check detailed status of a service e.g. httpd.service systemctl status httpd.service
List services that will automatically start on boot systemctl list-unit-files --type service | grep enabled
List all system units (all types not just services) that will automatically start on boot systemctl list-unit-files | grep enabled
Restart network service systemctl restart network.service
Show status of particular service systemctl status servicename
List units of type service

systemctl list-units --type=service

or just

systemctl --type=service

can also itemize by finding all *.service files in /etc/lib/systemd

Enable/Disable a service

systemctl enable servicename

systemctl disable servicename

e.g.

systemctl enable httpd.service

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]