How To Start, Stop and Get Status of Linux Service With Systemd?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/start-stop-get-status-linux-service-systemd/
PINTEREST
PINTEREST
INSTAGRAM

Services are all over the Linux world. Enterprise Linux world turn over services. There are different tools to manage Linux services like Sys-V, upstart, systemd etc. Systemd is gaining popularity in recent times. Fedora, CentOs, RedHat uses systemd for a long time. Ubuntu started to use systemd too. Here we will look into basics of the service management with systemd.

List Installed Services

We want to see installed services so we will start the services with its exact name.

  • In systemd services are named unit so we use systemctl list-units command.
  • As we see there information about service status like active
LEARN MORE  How to Install Ansible and Manage Servers

Get Status of a Service

Now we can know exact names of the services. We want to get detailed information about httpd service.

  • systemctl status is the command to get status information
  • httpd is the service we want to see status information.
  • Active:active means it is running currently
  • At the bottom we can see latest logs generated by httpd service
LEARN MORE  Find My Ip

Start Service

We can start httpd service easily like below

Stop Service

The easiest part of managing services is stopping them. We can stop them like start

Restart Service

After making configuration changes about services  we need to stop and start service. The practical way is just restarting service like below.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/start-stop-get-status-linux-service-systemd/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)