Systemctl Command Examples

Systemctl Command Examples

In this tutorial, we will go through the basics of systemctl command and examples. You can also get a basic idea regarding the usage of Systemctl. It is the tool to manage the init system. With these tools, you can manage services, check statuses, work with the configuration files, and do a similar job. Systemd is a critical part of Linux,

Systemctl Command Examples

What is Systemctl command?

Systemctl is a Linux command-line tool that is basically used for system management. It is mostly used to control and manage systemd and services.

Systemctl command to start and stop services

Run the following command to start services using systemctl

sudo systemctl start application.service

Run the following command to stop services using systemctl

sudo systemctl stop application.service

Systemctl command to restart services

Run the following command to restart a running service

sudo systemctl restart application.service

Systemctl command to enable services

Run the following command to enable the services

sudo systemctl enable application.service

and if you want to disable the services using systemctl command then run the following command:

sudo systemctl disable application.service

Checking the Status of Services using Systemctl

Run the following command to check the status of services using systemctl.

systemctl status application.service

Systemctl command to see a list of all of the active units

Run the following command to see a list of the active units on the system.

systemctl list-units

Run the command to see a list of inactive units on the system.

systemctl list-units --all --state=inactive

Displaying dependencies using systemctl

Run the following systemctl command to display the dependencies.

systemctl list-dependencies sshd.service

Systemctl command to edit unit file.

Run the following command to edit unit file.

sudo systemctl edit plymouth

Conclusion: Let us know if you have any suggestion for this article on systemctl command in Linux.

READ More Relevant Stuff:  How To Install Ubuntu Studio DE On Ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *