저는 Debian 10을 실행하고 있으며 가끔 컴퓨터를 부팅할 때 출력에 hostname -I
다음 세 가지 항목이 포함됩니다.
$ hostname -I
192.168.0.13 192.168.0.2 fdaa:bbcc:ddee:0:d69a:20ff:fef8:dca8
때로는 하나가 적습니다.
$ hostname -I
192.168.0.2 fdaa:bbcc:ddee:0:d69a:20ff:fef8:dca8
192.168.0.13이 어디서 왔는지 이해가 되지 않습니다. 내 호스트 파일의 내용은 다음과 같습니다.
$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 desktop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
편집하다:
192.168.0.2만 표시되면 출력 ip address
은 다음과 같습니다.
$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> 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: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether d4:9a:20:f8:dc:a8 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.2/24 brd 192.168.0.255 scope global dynamic enp0s10
valid_lft 3361sec preferred_lft 3361sec
inet6 fdaa:bbcc:ddee:0:d69a:20ff:fef8:dca8/64 scope global dynamic mngtmpaddr
valid_lft 2006054647sec preferred_lft 2006054647sec
inet6 fe80::d69a:20ff:fef8:dca8/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 90:84:0d:f3:85:7e brd ff:ff:ff:ff:ff:ff
2021년 6월 16일에 수정됨:
192.168.0.13 및 192.168.0.2가 표시되면 출력은 다음 ip address
과 같습니다.
$ ip address
1: lo: <LOOPBACK,UP,LOWER_UP> 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: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether d4:9a:20:f8:dc:a8 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.13/24 brd 192.168.0.255 scope global dynamic enp0s10
valid_lft 2290sec preferred_lft 2290sec
inet 192.168.0.2/24 brd 192.168.0.255 scope global secondary dynamic enp0s10
valid_lft 2666sec preferred_lft 2666sec
inet6 fdaa:bbcc:ddee:0:d69a:20ff:fef8:dca8/64 scope global dynamic mngtmpaddr
valid_lft 2006054625sec preferred_lft 2006054625sec
inet6 fe80::d69a:20ff:fef8:dca8/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 90:84:0d:f3:85:7e brd ff:ff:ff:ff:ff:ff