Objective

The following article will describe various ways how to restart network from command line as well as from Graphical User Interface (GUI) on Ubuntu 18.04 Bionic Beaver Linux

Operating System and Software Versions

  • Operating System: - Ubuntu 18.04 Bionic
  • Software: - GNOME Desktop

Requirements

Privileged access to is required for GUI network restart

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Graphical User Interface

Bring up network management window by right-click on the top right corner network icon and locate the network connection you wish to restart then click on Turn Off.

network restart on Ubuntu 18.04 Bionic Beaver Linux


The Network Icon will disappear. To turn on the network again, left click on the top right corner arrow down, locate your network interface and click Connect.

network start on Ubuntu 18.04 Bionic Beaver Linux

Command Line

To restart network from the command line you have the following options:

netplan

$ sudo netplan apply

systemctl

The first command line network restart uses the systemctl command to perform the restart of network manager.
$ sudo  systemctl restart NetworkManager.service

service

Same as the above can be accomplished with the service command:
$ sudo service network-manager restart


nmcli

Controlling the Network Manager with the nmcli command will restart the Network Manager directly:
$ sudo nmcli networking off
$ sudo nmcli networking on

System V init

The old fashioned and now obsolete way using System V init scripts directly is still available on Ubuntu 18.04 Bionic Beaver Linux:
$ sudo /etc/init.d/networking restart
OR
$ sudo /etc/init.d/network-manager restart

ifup/ifdown

In this last example we will restart the network interface directly using the ifup and ifdown commands. Note the the -a option will tell the ifup and ifdown commands to restart all available network interfaces marked as "auto":
$ sudo ifdown -a
$ sudo ifup -a
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.