2017年2月28日 星期二

The CentOS7 ficonfig command not found

No ifconfig in CentOS 7 Minimal Install

文章出處:http://centoshowtos.org/blog/ifconfig-on-centos-7/
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