25
26

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 5 years have passed since last update.

CentOS7を触る - IPアドレスの確認

Last updated at Posted at 2015-12-13

そろそろ仕事でもRHEL7系が必要にになってきたので、CentOS7触ってみる。
今回は、ipアドレス確認したかったんだけどifconfigなくなってるんですが、という話。

環境

$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)

OSインストールはCentOS-7-x86_64-Minimal-1503-01.isoを使用。

結論: ifconfigではなくipらしい

$ ifconfig
-bash: ifconfig: コマンドが見つかりません

ぅぉ。ifconfigコマンドがない。
ifconfigはデフォルトでは入っていなくて、デフォルトはipになったらしい。

$ 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: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:66:5f:56 brd ff:ff:ff:ff:ff:ff
    inet 192.168.235.67/24 brd 192.168.235.255 scope global eno16777736
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe66:5f56/64 scope link
       valid_lft forever preferred_lft forever

ちなみに、オプションの'a'はmanによるとaddressの省略版らしい。

IP - COMMAND SYNTAX
   OBJECT
       address
              - protocol (IP or IPv6) address on a device.
(中略)
      The names of all objects may be written in full or abbreviated form, for exampe address can be abbrevi‐
      ated as addr or just a.

参考

RHEL7/CentOS7でipコマンドをマスター
これからはifconfigではなくipを使う時代だ! - Qiita

25
26
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
25
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?