<img alt="Network Restart Rocky Linux" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/05/echo/rocky-linux-networking-restart.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="512" src="data:image/svg xml,” width=”1024″>
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:
- Use of NetworkManager service
- 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
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
<img alt="use nmcli command" data-ezsrc="https://kirelos.com/wp-content/uploads/2022/05/echo/c-users-dell-desktop-s2-png-1.png" data-ez ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="751" loading="lazy" src="data:image/svg xml,” width=”1052″>
To stop or turn off the network services, you will execute the following command on the terminal.
$sudo nmcli networking off
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.