linux 自分のipアドレスを調べるのにipコマンドをつかおう サーバー

linux 自分のipアドレスを調べる
ipコマンドを使う ip aでわかる
以下、vagrant環境でやってみたよ

[root@localhost log]# ip a
1: lo: <LOOPBACK UP LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
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: enp0s3: <BROADCAST MULTICAST UP LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:6c:3e:95 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
valid_lft 56532sec preferred_lft 56532sec
inet6 fe80::a00:27ff:fe6c:3e95/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST MULTICAST UP LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:be:06:ae brd ff:ff:ff:ff:ff:ff
inet 192.168.33.10/24 brd 192.168.33.255 scope global enp0s8 ★これ
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:febe:6ae/64 scope link
valid_lft forever preferred_lft forever
[root@localhost log]#