1. 程式人生 > >ifconfig command not found

ifconfig command not found

問題:在red hat enterprise linux 5中查詢IP地址時,輸入ifconfig命令報錯:“ifconfig: command not found”
原因:ifconfig命令所在路徑/sbin未包含在系統環境變數PATH中
解決方法:
1. 直接輸入:/sbin/ifconfig
2. 臨時修改環境變數:在shell中輸入
   $export PATH = $PATH:/sbin
   然後再輸入ifconfig命令即可,但是這只是臨時更改了shell中的PATH,如果關閉shell,則修改消失,下次還需要重複如上操作
3.永久修改PATH變數使之包含/sbin路徑:
   開啟/etc/profile檔案,在其中輸入export PATH=$PATH:/sbin,儲存並重啟X即可,這樣一來,PATH路徑永久修改成功,以後任何時候只需書序ifconfig命令即可

相關推薦

ifconfig命令無法找到,提示bash: ifconfig: command not found

pat sso and not found then 找不到文件 打開 分享 註銷 問題就是題目那樣,具體解決方法截圖如下: 分析問題 1.whereis ifconfig 看一下這個命令在哪個目錄下 2.echo $PATH 看一下該目錄是否在路經下,註意lunux下是

debian9 關於ifconfig命令找不到的問題(bash ifconfig:command not found)

##ifconfig bash ifconfig:command not found. 1,首先,很多解釋是,現在的linux系統都不適用net-tools工具了,所以找不到ifconfig,需要安裝net-tools,即 #sudo apt install net-tools就可以了,如

CentOS7下解決ifconfig command not found的辦法(轉)

解決辦法如下:  1、輸入ip addr 確認IP地址是否設定正常,設定好如下所示,如果沒有獲取到IP地址則設定一個即可。  2、確認sbin目錄是否存在。 cd /sbin 1 3、確認ifconfig命令是否未安裝  在sbin目錄下輸入ls,

Docker的ubuntu映象無ifconfig和ping命令 bash: ifconfig: command not found

https://blog.csdn.net/guizaijianchic/article/details/78137474 通過whereis ifconfig發現根本就沒有安裝這個命令,需要自己安裝 apt-get update  apt install net-tools #

【linux】CentOS 7 使用ifconfig命令報錯:-bash: ifconfig: command not found;ip/ifcongif命令檢視網路資訊的使用

目錄 一、ip命令檢視網路資訊 二、CentOS 7啟用ifconfig命令 三、ifconfig命令檢視網路資訊 一、ip命令檢視網路資訊 (1)輸入命令檢視網絡卡資訊,找到網絡卡名稱,可以看到該網絡卡已經分配到IP地址,輸入命令: ip addr &nbs

【學習筆記】CentOS 7.5 網路連線問題:ifconfig command not found解決

問題描述        在VMware上裝的CentOS-7-x86_64-DVD-1804.iso,網上搜了一下原因,可能是CentOS 7.5的最小化安裝少了一些工具,比如 ifconfig 及 netstat 等。因此解決辦法很簡單,把它們安裝上就好了。首先判斷一下是不

CentOS 7 下 ifconfig command not found 解決辦法

用VMWare安裝了CentOS7,選擇了最小安裝包模式,安裝完畢之後想檢視一下本機的ip地址,發現報錯 # ifcon -bash: ifconfig: command not found 谷歌了一下,整理了一下解決

ifconfig command not found

問題:在red hat enterprise linux 5中查詢IP地址時,輸入ifconfig命令報錯:“ifconfig: command not found”原因:ifconfig命令所在路徑/sbin未包含在系統環境變數PATH中解決方法:1. 直接輸入:/sbi

提示:“bash: ifconfig: command not found

提示:“bash: ifconfig: command not found” 切換到root使用者下安裝YUM源 [[email protected] /]# yum install net-tools 安裝過程中會提示[[email protected] /]# …

ifconfig: command not found(CentOS專版,其他的可以參考)

ifconfig: command not found 檢視path配置(echo相當於c中的printf,C#中的Console.WriteLine) echo $PATH 解決方案1:先看看是不是root使用者,如果不是就 su 切換到root使用者 su 解決方案

CentOS 7.0下解決ifconfig: command not found的方法

使用 最小 分享圖片 bin ifconf src mman 技術 centos 在CentOS7.0中輸入ifconfig命令會遇到-bash: ifconfig: command not found。 在CentOS最小安裝時是沒有附帶ifconfig,我們

解決Centos 7不能聯網且輸入ifconfig出現command not found

centos 7 無法聯網 無法獲得ip地址 在VMware Workstation中,以最小化方式安裝Centos 7後,發現無法獲得IP地址進行上網,這是因為Centos 7默認網卡未被激活。此外,在sbin目錄中沒有ifconfig文件,這是因為Centos 7已經不使用ifconfig命令

解決Centos7不能聯網且ifconfig出現command not found

分配 mman eno ip add 默認 scrip star restart 網卡 在虛擬機中以最小化方式安裝centos7,後無法上網,因為centos7默認網卡未激活。 而且在sbin目錄中沒有ifconfig文件,這是因為centos7已經不使用 ifconfig

CentOS下ifconfig出現“command not found

CentOS ifconfig ifconfig命令提示“command not found”,推測是安裝的時候選擇了最小安裝造成的。 查看/sbin目錄下是否存在ifconfig:ls /sbin發現不存在ifconfig 修改網卡配置:vi /etc/sysconfig/network-scri

新安裝的Centos7不能聯網且ifconfig出現command not found

net 分享圖片 config script 網絡 查看 文件 激活 原因分析 原因分析: 在虛擬機中以最小化方式安裝centos7,後無法上網,因為centos7默認網卡未激活。 而且在sbin目錄中沒有ifconfig文件,這是因為centos7已經不使用 ifcon

centos7 最小化安裝ifconfig提示command not found解決方法

images 地址 a20 ifconf 分享圖片 bee 方法 ash p地址 問題:centos7 最小化安裝後minimal install 想查看主機網卡信息ifconfig提示:-bash:ifconfig:command not found 要如何解決? 附圖

Docker進入容器後使用ifconfig等命令“command not found”解決辦法

bar tab fault -a mage ont bsp tools net 當進入一個容器後,使用ifconfig、ip addr等命令時,出現如下“command not found”: 解決辦法:

CentOS7輸入ifconfig返回command not found

ifconfig不能用:試下ip addr 網絡卡沒啟動: 1、進入網絡卡目錄   cd /etc/sysconfig/network-scripts 2、編輯ifcfg-ens33檔案  vi ifcfg-ens33 3、將ONBOOT屬性

ifconfig 執行command not found

vi /home/lx/.bash_profile中新增 PATH=$PATH:$HOME/bin:/sbin:/bin export PATH   linux檢視服務自啟動  chkconfig --list linux修改服務自啟動 ntsysv  

ifconfig eth0命令出現command not found&解決辦法&匯入命令路徑

我們在使用ifconfig eht0命令檢視網路IP的時候, 會出現command not found,這個訊息提示。 而且root許可權也是沒有用,這是什麼問題呢,正常執行命令是不需要輸入路徑的,除非環境變數中沒有才會手動寫入目錄,那麼如何手動寫入目錄呢