Unix & Linux Asked by Ranjan Kumar on November 11, 2021
On RHEL 7 or CentOS 7, the systemctl or systemd command works fine. I know it won’t work in RHEL 6 or CentOS 6. Can you tell me the alternative command for starting/stopping a service, for example: systemctl start iptables.service
?
RHEL6 and CENTOS 6 were using service
command to manage system services. From RHEL7 onwards systemctl
is used to manage system services.
Answered by Rakesh on November 11, 2021
rhel 6 and centos 6 are using upstart, not systemd. SysV (service and chkconfig) is also still supported.
Check documentation of initctl
and files in /etc/init/
Answered by Hexdump on November 11, 2021
In earlier versions of RHEL use the service
command as explained in the documentation here.
# service service_name start
Therefore, in your case:
# service iptables start
You can replace start
with restart
, stop
, status
.
List all services with:
# service --status-all
Answered by garethTheRed on November 11, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP