RHCSA Exam Objectives: Start, stop, and check the status of network services
In this lesson we are going to learn how to start, stop, enable, disable and check the status of network services on the Red Hat Enterprise Linux 7 system (RHEL)
Displaying Service Status
– To check status of a network service, type the following at a shell prompt
# systemctl status name.service
– To check if a service unit is running, run the following command:
# systemctl is-active name.service
– To check if a unit service is enabled to start automatically at boot, type:
# systemctl is-enabled name.service
Starting / Stopping a Service
– To start a service unit , type the following command:
# systemctl start name.service
– To stop a service unit , type the following command:
# systemctl stop name.service
Restarting / Reloading a Service
– To restart a service unit, run one of the following commands
# systemctl restart name.service # systemctl try-restart name.service
– To reload a service unit , type the following command:
# systemctl reload name.service
Enabling / Disabling a Service
– To Configure a service unit to start automatically at boot, use the following command:
# systemctl enable name.service
– To disable the service from starting automatically at boot, you can type:
# systemctl disable name.service
Listing Services
– To list all currently loaded service units, type the following command:
# systemctl list-units --type service
PS. If you like this post please share it with your friends on the social networks using the buttons below.Thanks.
1 comment
Got a typo at first command, typed twice
# systemctl systemctl status name.service