$ ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b8:27:eb:49:40:35 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.150/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2400:4060:e62:a700:ba27:ebff:fe49:4035/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 13538sec preferred_lft 13538sec
inet6 fe80::ba27:ebff:fe49:4035/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b8:27:eb:1c:15:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.150/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::ba27:ebff:fe1c:1560/64 scope link
valid_lft forever preferred_lft forever
|
$ sudo ip link set eth0 down
$ ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b8:27:eb:49:40:35 brd ff:ff:ff:ff:ff:ff
3: wlan0: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b8:27:eb:1c:15:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.150/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::ba27:ebff:fe1c:1560/64 scope link
valid_lft forever preferred_lft forever
|
$ sudo ip link set eth0 up
$ sudo ip link set wlan0 down
$ ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b8:27:eb:49:40:35 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.150/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2400:4060:e62:a700:ba27:ebff:fe49:4035/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 14369sec preferred_lft 14369sec
inet6 fe80::ba27:ebff:fe49:4035/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether b8:27:eb:1c:15:60 brd ff:ff:ff:ff:ff:ff
|
- eth0:有線LANアダプタ
- wlan0:無線LANアダプタ
- lo (local loopback) : local host ネットワーク
127.0.0.1 : local loopback address (「localhost」)
|