国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Linux > 正文

Fedora中ifconfig,netstat命令找不到

2024-08-27 23:59:31
字體:
供稿:網(wǎng)友

ifconfig是linux中用于顯示或配置網(wǎng)絡(luò)設(shè)備(網(wǎng)絡(luò)接口卡)的命令,英文全稱是network interfaces configuring了,這個命令一般情況下默認是安裝好的,如果沒安裝好在使用時會提示bash: ifconfig: command not found...了,下面我就碰到這種問題下面來看看.

如果出現(xiàn)下面問題:

  1. [root@thunderspeed ~]# ifconfig 
  2. bash: ifconfig: command not found... 
  3. [root@thunderspeed ~]#  
  4. [root@thunderspeed ~]# netstat 
  5. bash: netstat: command not found... 
  6. [root@thunderspeed ~]# 

分析問題:

1.whereis ifconfig 看一下這個命令在哪個目錄下.

2.echo $PATH 看一下該目錄是否在路經(jīng)下,注意lunux下是完全區(qū)分大小寫的,所以不要忽略這點.

3.執(zhí)行命令,需要指定路徑或者把目錄加入PATH中.

于是可以這樣訪問:

方法一:[root@localhost sbin]$ /sbin/ifconfig 就可以出現(xiàn)使用了.

方法二:[root@localhost sbin]$ export PATH=$PATH:/sbin,這樣設(shè)置后,下次就可以直接訪問了,免處第一種的麻煩,如:

[root@localhost /]$ ifconfig

修改/etc/profile文件,注釋掉if語句即可,把下面的if語句注釋掉:

  1. # Path manipulation  
  2. if [ "$EUID" = "0" ]; then  
  3. pathmunge /sbin  
  4. pathmunge /usr/sbin  
  5. pathmunge /usr/local/sbin  
  6. fi  
  7. //修改為  
  8. # Path manipulation  
  9. if [ "$EUID" = "0" ]; then  
  10. pathmunge /sbin  
  11. pathmunge /usr/sbin  
  12. pathmunge /usr/local/sbin  
  13. #fi   --Vevb.com 

如果還不行可能需要安裝一下使用provides搜索依賴包:sudo yum provides ifconfig

搜索結(jié)果是:net-tools 因此需要安裝 net-tools包即可

sudo yum install net-tools

保存,重新啟動.

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 垦利县| 黑水县| 班戈县| 潮安县| 太原市| 长沙市| 和硕县| 泸水县| 青铜峡市| 龙山县| 奉新县| 专栏| 昌宁县| 永新县| 得荣县| 海原县| 休宁县| 长垣县| 贵定县| 楚雄市| 商城县| 商河县| 珲春市| 江城| 建德市| 贵阳市| 兴义市| 曲阳县| 庐江县| 海盐县| 铁岭县| 哈尔滨市| 伊宁县| 大荔县| 兰西县| 西和县| 丹东市| 伊通| 临澧县| 台中县| 肥城市|