Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Distributions»Ubuntu»How to Restart Network on Ubuntu 20.04

    How to Restart Network on Ubuntu 20.04

    By 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.

    Advertisement

    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

    Related Posts

    How to Setup DKIM (DomainKeys) with Postfix

    A Step-by-Step Guide to Installing OpenDKIM with Postfix on Ubuntu – Unleash the Power of DKIM!

    How to Install Composer on Ubuntu 22.04

    How to Install Composer on Ubuntu 22.04

    How to Install Apache Kafka on Ubuntu 22.04

    How to Install Apache Kafka on Ubuntu 22.04

    View 2 Comments

    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

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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