[Linux]Restarting the network interface using command lines

Last update on December 7, 2008 10:25 AM by netty5
Published by netty5

[Linux]Restarting the network interface using command lines






When setting up a network, specially if you need to verify that a DHCP server assigns IP addresses correctly, 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 followingcommand , which restart all the networks services :
/etc/init.d/networking restart


To see your various network interfaces, use the command:

/sbin/ifconfig -a
Best answers for « Restarting the network interface using command lines » in :
[Windows XP] Repairing the network connection using command line Show [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...
Start/stop a service using command line Show Start/stop a service using command line The netsh tool (netsh.exe) can automate the startup or shutdown of a service through the following command line: To start a service: Net start name_of_service To stop a service:...
Enable/disable a device from the command line Show Enable/disable a device from the command line Install Devcon Display all the devices in the system Enable/disable the device Other devices Here is a trick that allows you to enable / disable a device from the command line in XP....
List of open ports in command line ShowList of open ports in command line Whether you're running Windows or Linux / Unix, the following command in (console) will display the list of open ports on your computer: netstat -a For the use of advanced graphics tools, see What...
Enabling/Disabling the firewall using command line ShowEnabling/Disabling the firewall using command line Disable Windows XP firewall Enable the Windows XP firewall Under Windows XP SP2, it is possible to enable/ disable the firewall with the following command lines: Disable Windows XP...
ImageMagick - Manipulate images with command lines ShowImageMagick - Manipulate images with command lines ImageMagick is a powerful command line tool that allows you to manipulate images. The advantage of this tool is that it allows: Automate work on images (this avoids...
Download Avira AntiVir Personal free for Linux / FreeBSD / OpenBSD / Solaris ShowFor Linux / FreeBSD / OpenBSD / Solaris Avira AntiVir PersonalEdition Classic is a very good and free antivirus which reliably protects your private computer against dangerous viruses, worms, Trojans, rootkits and costly dialers.
Download GNU Octave ShowGNU Octave is a program meant for numerical computations and will allow the user to display a command line interface to be able to solve numerical issues that are either linear of nonlinear. Features: The software has add ons that can allow you...
Network tests and diagnostics ShowTesting the IP configuration Before doing anything else, you are advised to check the computer's IP configuration. Windows systems offer a command-line tool, called ipconfig, that lets you find out your computer's IP configuration. The output of...
Network cards ShowWhat is a network card? A network card (also called a Network Adapter or Network Interface Card, or NIC for short) acts as the interface between a computer and a network cable. The purpose of the network card is to prepare, send, and control data...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...