CentOS / RHEL 7 Restart / Stop / Start Networking Command

I recently installed CentOS Linux version 7 or Red Hat Enterprise Linux version 7. How can I restart networking service using command line options? How can I start / stop and restart networking service on a CentOS/RHEL 7 based system?

CentOS 7 / RHEL 7 / Fedora Linux (many other modern distor) uses Systemd. It is a system and service manager for Linux operating systems. In newer distro such as CentOS7/RHEL7 systemd replaces Upstart as the default init system. [donotprint]
Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements CentOS/RHEL 7
Fedora Linux latest
Est. reading time 2m

In older versions of CentOS or Red Hat Enterprise Linux, you used init scripts located in the /etc/rc.d/init.d/ directory. These init scripts were typically written in Bash, and allowed the system administrator to control the state of services and daemons in their system. In CentOS/RHEL 7, these init scripts have been replaced with service units.

CentOS 7 / RHEL 7 networking service name

To bring up/down networking service you need to use the network.service.

Say hello to systemctl command

Use this command to control the systemd system and act as a service manager.

CentOS 7 / RHEL 7 get status of network service
sudo systemctl status network.service


sudo systemctl status network

Sample outputs:

Fig.01: CentOS / RHEL 7 Networking Service Status Command

CentOS 7 / RHEL 7 restart network service
sudo systemctl restart network.service


sudo systemctl restart network

CentOS 7 / RHEL 7 start network service
sudo systemctl start network.service


sudo systemctl start network

CentOS 7 / RHEL 7 stop network service
sudo systemctl stop network.service


sudo systemctl stop network

Sample outputs:

Animated gif 01: systemctl command in action

A note about old service and chkconfig command

The service and chkconfig commands are still available in the system and work as expected, but are only included for compatibility reasons and should be avoided as may be dropped in future release.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 14 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
14 comments… add one
  • Medhansh Jul 23, 2014 @ 15:32


    Nice start with CentOS/RHEL 7. Waiting for more updates from you. As your blog is very helpful for us….

  • Gr0ove Jul 25, 2014 @ 17:24

    Hi there,

    Before anything else good article and thanks for it ;) just a quick add to it, Firewall in CentOS 7 works a bit differently than previous ones has I noticed, so if anybody is having difficulty accessing the Nagios web GUI at the end, try adding this firewall rules for ports 80 (http) and 443 (https):

    [root@nagios-server /]# firewall-cmd –permanent –zone=public –add-service=http
    [root@nagios-server /]# firewall-cmd –permanent –zone=public –add-service=https
    [root@nagios-server /]# firewall-cmd –reload

    And after that you should now be able to access the web GUI with no problems ;)

    Best ragards

  • l4sh Jul 25, 2014 @ 20:28

    Just in case anyone is wondering what is the equivalent of the chkconfig servicename on/off is:

    systemctl enable servicename
    systemctl disable servicename

    The Fedora people put a nice cheatsheet over here https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet

  • Daniel Baker Sep 15, 2014 @ 20:51

    I like Centos 7 so far but Systemd can die in a fire. I want my SysV init scripts back.

    • JC Oct 1, 2014 @ 21:54

      @ Daniel, I second this motion. Hey everybody, let’s take something that has worked perfectly for 20+ years and change it for no good reason.

      • peter Co. Dec 29, 2014 @ 17:14

        @Daniel, third this motion, systemd is incompatible with SysV which proved pretty clean and easy to maintain. I’m afraid systemd will end up another upstart.

        really like SysV scripts, and I am afraid that it is not easy to upgrade from redhat/centos 6.x to 7.

  • Hans Sep 20, 2014 @ 12:57

    Your firewall commands didn’t work with my fresh CentOS 7 install.
    I had to do the follwoing to access my webserver/httpd remotely:

    [code]firewall-cmd –permanent –zone=public –add-port=80/tcp
    systemctl restart firewalld.service[/code]

  • LDVHAI Oct 13, 2014 @ 12:23

    A lot of new things in CentOS 7. I think, it isn’t easy for IT people to change the configurations from CentOS 6.X to 7.0 (short but big change!?), not easy to follow in this time.

  • alex Nov 15, 2014 @ 18:46

    or you can jus disable firewell-cmd and use iptables instead , after you install the it with
    yum install iptables-services

  • Aswin Triadhi Jan 15, 2015 @ 3:07

    I wanna ask something about network manager, how to lock network manager only root can change or edit the setting, or must input root password to edit the network setting from network manager.
    because if user click network manager icon, user can change the setting without permission.

    prevent user from changing the network setting.

    thank you

  • Milu Apr 21, 2015 @ 15:37


    I just started to use CentOS 7, but I see some problems with network stop/start/restart.
    The current implementation does not allow to retain an address if the interface is down (useful of the machine is a gateway and it is accessed from the ‘still-alive’ connection), probably I need to use a loopback address for this purpose.
    Can anyone tell me if there’s a method to restart a single interface, other than nmtui ?
    only the plain old ifdown/ifup ?

    • mark May 21, 2015 @ 3:00

      if you do a few commands

      nmcli con show ## this will show you the names of the connections##
      nmcli con reload eth0
      nmcli con down eth0
      nmcli con up eth0

      Look at nmcli con commands they are pretty easy

  • aref ghobadi Aug 15, 2015 @ 7:33

    thank you

  • Terry1738 Jul 6, 2016 @ 4:10

    I dont mind this new way to control programs with 1 caveat. I the old system if you were not quiet sure of the spelling of the service (i.e spamassassin or ist spamasissin or etc etc) all you had to do was type /etc/init.d/spam and a couple of tabs and you could easily get it. I made a link to /etc/init.d called apps so it was even easier just typed /apps/spam and got it that way. I can not see an easy way to do this in the new system otherwise no problems. (maybe some one can show me)

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum