どうやらifconfigを使うのは時代遅れかもしれません。。
以下のようにIPアドレスを調べたいがifconfigがない場合は、
$ ifconfig
ifconfig: command not found
ipコマンドを実行すればよい
ip addr show
ip -4 addr show #ipv4のアドレスを表示する場合
ip -6 addr show #ipv6のアドレスを表示する場合
ipコマンドはifconfig以外の以下コマンドを統合するものらしい
If you’re still using ifconfig, you’re living in the past
Are you still using one of the following tools?
/bin/netstat (replaced by ss, for which I’ll dedicate another blog post entirely)
/sbin/ifconfig
/sbin/ipmaddr (replaced by ip maddress)
/sbin/iptunnel
/sbin/mii-tool (ethtool should appropriately replace it)
/sbin/nameif
/sbin/plipconfig
/sbin/rarp
/sbin/route
/sbin/slattach
どうしてもifconfigを使いたい場合はnet-tools
をインストールすれば使えるが、
なるべくipコマンドを使っていった方が時代についていけそう
sudo apt install net-tools
参考
If you’re still using ifconfig, you’re living in the past
Questions about CentOS-7
ifconfigコマンドとipコマンドの違いと比較