Linux - Restarting the network interface using command lines

Restarting the network interface using command lines in Linux is a straight-forward procedure. While the GUI for Linux network configuration is more graphical and visually appeasing, it may take longer to restart the network interface by using it. In operating systems such as Linux, generally, the command line operations accomplish the task faster than the GUI interface. Restarting the network interface by using command lines will require the user to have certain privileges and get logged in as the root user, or via the Sudo. There are separate commands to restart the network services and to restart a particular network interface.

[Linux]Restarting the network interface using command lines




Issue


When setting up a network, especially if you need to verify that a DHCP server assigns IP addresses correctly, the process can be quite lengthy.

Solution


Restarting the network interface using command lines rather than the GUI may be quicker.

These commands should be executed as root or via sudo. The following commands are specific to debian (Ubuntu or Xandros)
  • Stop the network interface eth0:
    • ifdown eth0 
  • Start the network interface eth0:
    • ifup eth0 
  • Don't confuse with the following command, which restarts all the networks services :
    • /etc/init.d/networking restart
  • To see your various network interfaces, use the command:
    • /sbin/ifconfig -a
Published by netty5 - Last update on February 2, 2012 04:18 PM by Virginia Parsons
This document entitled « Linux - Restarting the network interface using command lines » from Kioskea.net (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Suggestions
  •  Linux - Restarting the network interface using command lines
  •  Enable/disable a device from the command line » Tips : It is possible to enable/disable devices from the command line in Windows XP, by managing internet connection, network cards and tuner cards. Download Devcon, locate it on the system folder, and install it. You can see all devices connected to the...
  •  Windows - Start/stop a service using command line » Tips : In the Windows operating system, start up or shutdown of a service can be automated. This can be done by the netsh tool that has a file extension name of netsh.exe. This tool can configure computers by using the Windows platform and with the help of...
  •  Windows XP - Repairing the network connection » Tips : For users of Windows XP operating system based computers, there are many user-friendly features that will enhance their user experience. One such feature in Windows XP enables the repair of network connections which will definitely add to the user...
  •  [Windows XP] Repairing the network connection using command line » Tips : [Windows XP] Repairing the network connection using command lines Under Windows XP there is a small feature allowing you to repair a network connection. Go to the Network Connections options in Control panel (Control Panel / Network...
  •  [Ubuntu]Restart Gnome or KDE in command line » Tips : [Ubuntu]Restart Gnome or KDE in command line To restart Gnome: Open a terminal and type: sudo /etc/init.d/gdm restart To restart KDE: Open a terminal and type: sudo /etc/init.d/kdm restart
How to use the "tar"command?
[Windows XP] Unable to display hidden files and folders..