Keywordsrestart network ubuntu restart network manager ubuntu how to restart network manager ubuntu
Regardless of whether you are using a Windows or Linux system, when you cannot connect to the network normally, you generally only need to restart the network card to fix most network connection problems. In a Windows system, it is very simple to disable and enable the network card, but there are many ways to restart the network function in Ubuntu and other Linux distributions.
Alibaba Cloud Simple Application Server: Anti COVID-19 SME Enablement Program
$300 coupon package for all new SMEs and a $500 coupon for paying customers.
In order to meet the needs of different users and usage scenarios, the method of restarting the network function in the Ubuntu system is basically divided into two methods: "terminal" command line and "GUI graphical interface". The following system geeks will give you a detailed summary. .
Use the "terminal" command to restart the Ubuntu network function
If you are using the Ubuntu desktop version, you can use the Ctrl+Alt+T shortcut to open the "terminal", and then use the following command to restart the Ubuntu network function:
Method 1: Network Manager service
The easiest way to restart the network using the command line is to restart the Network-Manager service:
sudo service network-manager restart
After executing the above command, the network icon will disappear for a while and then reappear to indicate that the service restarts successfully.
Method 2: systemd
The service command is just a packaged general command (also applicable to init.d script and Upstart command), and in the new version of Ubuntu system, the systemctl command is more general than the service command:
sudo systemctl restart NetworkManager.service
Method 3: nmcli
nmcli is another practical tool for dealing with network problems in Linux systems. Because it is very powerful and practical, many administrators often use it.
The nmcli tool is also very simple to use, just disable and re-enable the network:
sudo nmcli networking off
After the network icon disappears, execute the following command to enable the network:
sudo nmcli networking on
For more parameter options of nmcli, please refer to the man page by yourself.
Method 4: ifup and ifdown
Ifup and ifdown are one of the most commonly used network commands in Linux systems, they can directly process the network interface to configure its state to allow or prohibit the transmission and reception of data.
To shut down all network interfaces, use the ifdown command:
sudo ifdown -a
Use the ifup command to re-enable all network interfaces:
sudo ifup -a
Note: This method will not make the network icon in the system tray disappear, but you will not be able to make any type of network connection.
In addition to restarting the network function of the Ubuntu system through the "terminal" command, we can also use the terminal command to monitor the Linux network bandwidth when the network is normal.
Use "GUI Graphical Interface" to restart Ubuntu network function
For desktop users who use non-Ubuntu
Server, it is easier to restart the network using the "GUI graphical interface". We need to use the NM-applet, the indicator of the Network Manager in the system tray, to restart the network:
1 Click the wired or Wi-Fi icon in the "Top Panel".
2 Click the wired or Wi-Fi icon again in the pop-up menu
3 Select ``Close'' in the expanded options to disable the network
The network icon should now disappear from the top panel, which means the network has been successfully closed.
Select "Connect" twice through the above method to re-enable the network connection.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.