0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ubuntu18でifconfig: command not found

Posted at

どうやらifconfigを使うのは時代遅れかもしれません。。

If you’re still using ifconfig, you’re living in the past

以下のように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コマンドの違いと比較

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?