systemctl command not working in RHEL 6

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?

Unix & Linux Asked by Ranjan Kumar on November 11, 2021

3 Answers

3 Answers

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

Add your own answers!

Related Questions

No devices for “nmcli connection show “

0  Asked on January 22, 2021 by kylie


How to get KWin-like window snapping in Xfce?

1  Asked on January 22, 2021 by bluekingwhite


Out of disk space error when trying to write to frame buffer

0  Asked on January 21, 2021 by novicefedora


How to build a chroot using docker?

2  Asked on January 20, 2021 by wimateeka


Telnet connection to Debian machine refused

1  Asked on January 20, 2021 by hakk


Unable to mount using mount.cifs command

1  Asked on January 19, 2021 by sk23


Problem: My terminal settings are not saved

0  Asked on January 19, 2021 by sagi-aizenman


init script for alpine not working

1  Asked on January 18, 2021 by karlsebal


Filter rows of a file by list of a second file

1  Asked on January 18, 2021 by sh-yang


Have to restart network service after reboot (centos 7)

1  Asked on January 17, 2021 by raoulpetite


Ask a Question

Get help from others!

© 2021 All rights reserved.