https://www.youtube.com/watch?v=Zf5Ekn4pesw

Tip1. Checks if a service is running.

systemctl status httpd 
      or
systemctl is-active httpd 

Tip2. Stops a service.

systemctl stop httpd

Tip3. Starts a service.

systemctl start httpd

Tip4. Restarts a service.

systemctl restart httpd

Tip5. Restarts a service only if it is running.

systemctl try-restart httpd

Now stop apache service and try to restart using try-restart. It will not restart. 
systemctl stop httpd
systemctl try-restart httpd
systemctl status httpd    (Service will be Stopped)

Tip6. Reloads configuration (Main PID will not change on reload)

systemctl reload httpd

Tip7. Displays the status of all services.

systemctl list-units --type service --all

Tip8. Displays the status of running services.

systemctl list-units --type service --all | grep running

Tip9. Enables a service so that on boot it could automatically up

systemctl enable httpd

Tip10. Checks if a service is enabled.

systemctl is-enabled httpd
       or
systemctl status httpd

Tip11. Disables a service so that it could not up automatically at the time of boot.

systemctl disable httpd

Tip12. Lists all services and checks if they are enabled.

systemctl list-unit-files --type service
systemctl list-unit-files --type service | grep enabled

Tip13. Lists services that are ordered to start before the specified unit.

systemctl list-dependencies --after network

Tip14. Lists services that are ordered to start after the specified unit.

systemctl list-dependencies --before network

Tip15. If you want to ensure that the symbolic links are re-created, use the following command

systemctl reenable httpd

Tip16. you can mask any service unit to prevent it from being started manually or by another service.

systemctl mask httpd

This command replaces the /etc/systemd/system/name.service file with a symbolic link to /dev/null

# systemctl restart httpd
Failed to restart httpd.service: Unit is masked.

Tip17. To revert this action and unmask a service unit,

systemctl unmask httpd

Tip18. Viewing the Default Target

systemctl get-default

Tip19. Viewing the Current Target

systemctl list-units --type target
 
systemctl list-units --type target graphical.target
systemctl list-units --type target multi-user.target

Tip20. Changing to Rescue Mode

systemctl rescue

To prevent systemd from sending this message, run this command with the --no-wall command line option:
systemctl --no-wall rescue

Tip21. Changing to Emergency Mode

systemctl emergency

To enter emergency mode without sending a message to all users that are currently logged into the system, run the following 
systemctl --no-wall emergency

After work come to default mode 
systemctl default

Tip22. Restarts the system.

systemctl reboot

Tip23. Powers off the system.

systemctl poweroff
 
Power off in a specified time. 
shutdown --poweroff hh:mm 

Tip24. Suspends the system. (This command saves the system state in RAM and with the exception of the RAM module)

systemctl suspend

Tip25. Hibernates the system.

systemctl hibernate

Tip26. CONTROLLING SYSTEMD ON A REMOTE MACHINE

systemctl -H root@192.168.72.140 status httpd.service
 
In the similar way you can start , stop , status, enable, disable of services on remote host. 

For Live Installation you may refer below youtube link:-

https://www.youtube.com/watch?v=Zf5Ekn4pesw

LEAVE A REPLY

Please enter your comment!
Please enter your name here