Systemctl can be used to check the state and modify the behavior of the systemd services.
Systemctl command can also help us display the settings of a service.
For example to display the settings of a service we use the below command:



The configuration file determines how the services are started, paths, aliases,...

Example:



Starting  service automatically at boot time:

When we try to run the below command to launch the sshd process for example:


The sshd service will not start automatically once we reboot the machine. For that to happen, we will need to enable the service:


Displaying the services on a system:


To list all the services including the inactive ones, we use:


Masking a service:

Masking  a service prevents it from being started.


Unmasking  a service:

Unmasking a masked service makes it possible for the service to be started again. 



Brando Sabatini and Ikbal C ©. Powered by Blogger.