Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Distributions»Ubuntu»How to Restart Network on Ubuntu 20.04

    How to Restart Network on Ubuntu 20.04

    RahulBy RahulSeptember 29, 20202 Mins Read

    The NetworkManager service is the responsible to handle network on a Ubuntu system. NetworkManager daemon is available for most of modern Linux kernel-based and other Unix-like operating systems.

    You can use NetworkManager for the configuration of the following connections types like: Ethernet, wireless, mobile broadband, and DSL and PPPoE (Point-to-Point over Ethernet). It also allows the configuration of the network aliases, static routes, DNS information and VPN connections on Linux systems.

    This tutorial will help you to Start/Stop and Restart network services on Ubuntu Linux system.

    Restart Network on Ubuntu 20.04

    You can restart the network service with the command line interface as well as using the Desktop interface. Here are the three methods available to restart network service on Ubuntu system.

    • Method 1 – Using NetworkManager Service (CLI)

      NetworkManager is a daemon for simplifying the networking on Unix-like systems. It provides a rich API for the applications to query and control network configuration and state.

      Use the followings commands to start/stop network service on a Ubuntu Linux system.

      sudo systemctl start NetworkManager 
      sudo systemctl stop NetworkManager 
      

      Use the followings commands to restart network service.

      sudo systemctl restart NetworkManager 
      
    • Method 2 – Using nmcli Tool (CLI)

      The nmcli is a command-line utility for managing NetworkManager on a Ubuntu system. You can simply use this utility to stop/start network service on a Ubuntu system.

      WARNING – Do not run nmcli networking off for the remotely connected systems. This will disable the NetworkManager network connections on the machine and you will lose connection.
      sudo nmcli networking off  
      sudo nmcli networking on 
      

      The above command will disable/enable the network connections on Ubuntu Linux system.

    • Method 3 – Using Desktop

      For the Ubuntu desktop users, Users can directly enable disable networking from the interface. To disable networking:

      • Move mouse pointer to top-right corner.
      • Click on triangle icon button.
      • Click Wired Connected option.
      • Then click Turn Off.

      To enable the networking on Ubuntu follow below steps:

      • Move mouse pointer to top-right corner.
      • Click on triangle icon button.
      • Click Wired Off option.
      • Then click connect.

    Conclusion

    In this tutorial, you have learned 3 methods restart network services on a Ubuntu system.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleGit Worktrees: Parallel Development Guide
    Next Article How to Install LibreOffice 7.0 on Ubuntu 20.04

    Related Posts

    Changing the Login Screen Background in Ubuntu 22.04 & 20.04

    Updated:May 9, 20222 Mins Read

    (Resolved) Please install all available updates for your release before upgrading

    2 Mins Read

    How to Install LightDM Display Manager on Ubuntu

    Updated:May 10, 20222 Mins Read

    Change Screen Resolution of An Ubuntu VM in Hyper-V

    Updated:May 2, 20222 Mins Read

    How to Check IPv4 Address on Ubuntu 22.04

    2 Mins Read

    How to Configure Static IP Address on Ubuntu 22.04

    Updated:May 4, 20223 Mins Read

    2 Comments

    1. ng on June 26, 2021 12:09 am

      I’m shocked how confused this entry is, there is a clear and properly working way to restart the networking on Ubuntu 20.04, most of these articles show 10 different ones, they don’t seem to know which network system Ubuntu 20.04 uses, very very strange.

      Reply
    2. Randy Spina on May 23, 2021 12:16 pm

      restarting NetworkManager does not necessarily read the new config from /etc/NetworkManager/system-connections/W*

      I found that nmcli is best – but iftrequires 2 commands and the off kills your interactive PuTTy

      Here is a way I reloaded a new config even though I was in PuTTy (of course had to re login with new PuTTy after the IP change)

      [email protected]:~# vi /etc/NetworkManager/system-connections/W*

      [email protected]:~# /root/scripts/schedule_nmcli_reloadconfigs.sh_byat.sh
      [email protected]:~# cat /root/scripts/schedule_nmcli_reloadconfigs.sh_byat.sh
      #!/bin/bash
      echo /root/scripts/nmcli_reloadconfigs.sh | at now + 1 minutes 2> /dev/null
      [email protected]:~#

      [email protected]:~/scripts# cat nmcli_reloadconfigs.sh
      #!/bin/bash
      /usr/bin/nmcli c reload
      sleep 2
      /usr/bin/nmcli networking off
      sleep 2
      /usr/bin/nmcli networking on
      [email protected]:~/scripts#

      When ready just execute:
      /root/scripts/schedule_nmcli_reloadconfigs.sh_byat.sh

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.