ifconfig: command not found(CentOS專版,其餘的能夠參考)

ifconfig: command not foundhtml

查看path配置(echo至關於c中的printf,C#中的Console.WriteLine)bash

echo $PATH 

 

解決方案1:先看看是否是root用戶,若是不是就 su 切換到root用戶網絡

su工具

解決方案2:(若是沒看見 /sbin)【咱們這顯然不是這個問題】ui

這個通常都是由於配置沒弄好,永久解決:spa

打開/etc/profile文件,在其中輸入export PATH=$PATH:/sbin.net

 

解決方案3:(CentOS後來換指令了,看看咱們是否是【ifconfig==>ip】)3d

在 /(根目錄)裏面查找 name(名字)是 ifconfig 的東東htm

說明ifconfig真的換了,淡定blog

看看信息

 ip addr

發現木有(看 2:eth0 沒有ipv4)

跳轉到 /etc/sysconfig/network-scripts 目錄

cd /etc/sysconfig/network-scripts

用vi打開 ifcfg-eth0 (你的多是eth1,或者其餘,不是每一個電腦都是這個的)【若是想改爲這個能夠參考:http://jingyan.baidu.com/article/7f41ecec1b022e593d095c1e.html

i 進去編輯模式 ,修改箭頭處,而後按 esc 退回命令模式,輸入:wq 並回車

重啓一下 

reboot

用root用戶登錄後 輸入 

ip addr

成功!!

 

解決方案4:(網絡)

http://blog.sina.com.cn/s/blog_946cb2b70100wx2j.html

 

yum install setuptool安裝setup,不過安裝後使用運行setup只有Authentication configuration可用。

如想配置IP,安裝system-config-network-tui便可。

yum install system-config-firewall-tui安裝圖形化Firewall配置工具。

yum list system-config*  所有安裝。

 

參考:http://blog.csdn.net/johnstrive/article/details/5625121

相關文章
相關標籤/搜索