Raspberry Pi_Eng_11.7.2 Activation and Stop with “ifconfig” Command


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


11.7.2  Activation and Stop with "ifconfig" Command

 

We used the "ifconfig" command to look up the current state of the network. However, this "ifconfig" command can also be used to activate or stop the network using "up" or "down" as an option.

The command format used to activate the network device is as follows

 

[Command Format]

ifconfig     [option]   [interface]  up

 

The command format used to stop the network device is as follows

 

[Command Format]

ifconfig     [option]   [interface]  down

 

 

[Used Example]

The following is an example of using the "ifconfig" command to stop the network.

 

pi@raspberrypi ~ $ ifconfig down

 

pi@raspberrypi ~ $ ifconfig

 

 

The following is an example of using the "ifconfig" command to activate the network.

 

pi@raspberrypi ~ $ ifconfig up

 

pi@raspberrypi ~ $ ifconfig