Manage services in Linux with systemctl


 manage state of the daemons on your Linux system with this command line tool.


Systemctl:  may be used to introspect and control the state of the  "systemd" system and service manager. i.e. you can manage state of the daemons on your Linux system with this command line tool.

Note: the given commands should be either run as 'root'  or  with sudo (e.g.  sudo systemctl .... )

  • List all services: Most daemons or services are having an extension .services you can list status of all services via the following commands.  
    • systemctl list-unit-files --type=service
  • Get status of a service
    • systemctl status *.service
  • Get status of a specific service
    • systemctl status apache2.service
  • Start a service
    • systemctl start tomcat9.service
  • Stop a service
    • systemctl stop tomcat9.service
  • Restart a service
    • systemctl restart tomcat9.service
  • Reload a service
    • systemctl reload apache2.service   // works if reload is applicable
  • Start a service automatically at boot
    • systemctl enable tomcat9.service
  • Remove a service from starting automatically at boot
    • systemctl disable tomcat9.service

 

Main category

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
Enter the characters shown in the image.
Are you a robot?
Address

OpenSourceCook.in
"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions