How to Start, Stop or Restart Network Services on Rocky Linux 8

Network Restart Rocky Linux

You may need to restart or stop network services on your Rocky Linux system occasionally.  This article shows you step-by-step how to start, stop, or restart network services on Rocky Linux 8. The same commands also work on other RHEL clones such as AlmaLinux 8 and CentOS 8.

Steps to start, stop and restart the network service

Open the terminal window on your system and run the ‘su’ command on the terminal to log in as the root user.

There are the following two ways through which you can start, stop or restart network service:

  1. Use of NetworkManager service
  2. Use of nmcli tool

Now, we will explore each way one by one in the following tutorial:

Use of NetworkManager service

To start a network service on the RockyLinux 8, you will run the below-given command:

$sudo systemctl start NetworkManager.service

Login as root user via su

The above-mentioned command is used to start a network service on RockyLinux 8.

To stop a network service on the RockyLinux 8, you need to run the below-mentioned command:

$sudo systemctl stop NetworkManager.service

To restart a network service, you need to execute the following command:

$sudo systemctl restart NetworkManager.service

Use of nmcli tool

The nmcli is a tool or utility that is used for managing the NetworkManager services through the terminal.

Note: Before starting to use nmcli utility, it is noted that do not try to execute ‘$nmcli networking off’ for those systems that are connected remotely with others. This command will stop or disable the NetworkManager settings and you will disconnect from the network connection.

To turn on the network services, you will type the following command on the terminal in RockyLinux 8.

$sudo nmcli networking on

use nmcli command

To stop or turn off the network services, you will execute the following command on the terminal.

$sudo nmcli networking off

Conclusion

In this article, you have learned how to start, stop or restart network services on RockyLinux 8. I hope you have enjoyed this article and it would be helpful for you as well.  Provide your feedback in the comment section.

How to Start, Stop or Restart Network Services on Rocky Linux 8