Saturday, September 28, 2013

Start or stop network interfaces on Debian Linux

I would like to start or stop network interfaces from time to time because, for example, I don't need the Internet and the computer is working on a lot of mathematical calculations. In that case, shutting down the network interface may help to reduce some CPU usage.

Sometimes, I need to set up the Internet connection manually. Here are some useful commands.


# learn more about the network interfaces
nano -v /etc/network/interfaces

# stop all network interfaces
ifdown -a

# check if network interfaces are up and running
ifconfig

# start a network interface
ifup eth0

# start the network interfaces set to auto
ifup -a

# check if network interfaces are up and running
ifconfig


Reference:

http://www.linuxcat.org/showthread.php?tid=35

No comments: