Using System Target on Redhat 7

Using System Target on Redhat 7


  • To check all active targets on the system.

[root@localhost]# systemctl list-units --type=target


  • To check all targets installed on the disk.

[root@localhost]# systemctl list-units --type=target --all


  • How to display the current default target.

[root@localhost]# systemctl get-default


  • Change the default target to the multi-user target

root@localhost]# systemctl set-default


  • View all available systemd configuration units.

[root@localhost]# systemctl -t help


  • Find the status of the httpd service.

[root@localhost]# systemctl status httpd.service


  • List all active service unit configuration files.

[root@localhost]# systemctl --type=service


[root@localhost]# systemctl list-units --type=service


  • Determine if the sshd service is active.

[root@localhost]# systemctl is-active sshd


  • Determine if the httpd service is enabled, and, if it is not, enable it.

[root@localhost]# systemctl is-enabled httpd


  • View enabled and disabled settings for all units of the type "service".

[root@localhost]# systemctl list-unit-files --type=service --all


  • List all service unit configuration files, whether they are active or not.

[root@localhost]# systemctl list-units --all


[root@localhost]# systemctl list-units --type=service --all

Was this article helpful?
0 out of 0 found this helpful

Have more questions? Contact our support instantly via Live Chat