ifconfig on CentOS 7

No ifconfig in CentOS 7 Minimal Install

One of the first things that you might notice when logging into a new CentOS 7 minimal installation is there is no ifconfig command.

[root@node01 ~] # ifconfig
- bash : ifconfig : command not found 

First thought may be, maybe /sbin/ isn’t in my PATH environment variable, but this isn’t the case.

You can use the "yum provides" command to figure out what packages provide certain commands or files you're used to using.

yum provides ifconfig

The utility has been deprecated, but if you want to use it, just install net-tools.

yum -y install net-tools

Alternatively, you can get and manipulate your IP address using the ip command:

ip addr sh
Current rating: 4.6

(Comments)

Comments