在centos下 ifconfig 無報錯但無輸出結果?ifconfig不能用?

在centos下 ifconfig 無報錯但無輸出結果?ifconfig不能用?
[root@xwx~]# ifconfig
[root@xwx~]# 

如果已安裝則卸載載安裝就好了

#卸載net-tools
yum remove net-tools

#安裝net-tools
yum install net-tools

執行過程效果:

[root@localhost ~]# yum remove net-tools
已加載插件:fastestmirror
正在解決依賴關係
--> 正在檢查事務
---> 軟件包 net-tools.x86_64.0.2.0-0.25.20131004git.el7 將被 刪除
--> 解決依賴關係完成

依賴關係解決

====================================================================================
 Package           架構           版本                             源          大小
====================================================================================
正在刪除:
 net-tools         x86_64         2.0-0.25.20131004git.el7         @/         917 k

事務概要
====================================================================================
移除  1 軟件包

安裝大小:917 k
是否繼續?[y/N]:y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在刪除    : net-tools-2.0-0.25.20131004git.el7.x86_64                       1/1 
警告:文件 /sbin/ifconfig: 移除失敗: 沒有那個文件或目錄
  驗證中      : net-tools-2.0-0.25.20131004git.el7.x86_64                       1/1 

刪除:
  net-tools.x86_64 0:2.0-0.25.20131004git.el7                                       

完畢!


======================================================================================


[root@localhost ~]# yum install net-tools
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.aliyun.com
正在解決依賴關係
--> 正在檢查事務
---> 軟件包 net-tools.x86_64.0.2.0-0.25.20131004git.el7 將被 安裝
--> 解決依賴關係完成

依賴關係解決

====================================================================================
 Package          架構          版本                              源           大小
====================================================================================
正在安裝:
 net-tools        x86_64        2.0-0.25.20131004git.el7          base        306 k

事務概要
====================================================================================
安裝  1 軟件包

總下載量:306 k
安裝大小:917 k
Is this ok [y/d/N]: y
Downloading packages:
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm                | 306 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安裝    : net-tools-2.0-0.25.20131004git.el7.x86_64                       1/1 
  驗證中      : net-tools-2.0-0.25.20131004git.el7.x86_64                       1/1 

已安裝:
  net-tools.x86_64 0:2.0-0.25.20131004git.el7                                       

完畢!


===================================================================================


[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.10  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe70::20c:29ee:fe65:b6f2  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:30:65:a4:e2  txqueuelen 1000  (Ethernet)
        RX packets 9427  bytes 10752810 (10.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2101  bytes 186230 (181.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost ~]# 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章