問題
輸入 ifconfig 卻找不到命令,出現 bash: ifconfig: command not found

解法
通常這是因為 ifconfig 的路徑並未定義在 $PATH 裡,所以找不到。

1. 找出 ifconfig 的位置
# whereis ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
找到路徑在 /sbin/ifconfig

2. 將 /sbin 加入 $PATH 中
   2.1 # PATH="$PATH":/sbin

3. 再執行一次
# ifconfig


參考文件
http://blog.himdd.com/?p=2374
http://jslinux.pixnet.net/blog/post/12070163-%E5%A6%82%E4%BD%95%E8%A8%AD%E5%AE%9A%E7%92%B0%E5%A2%83%E8%B7%AF%E5%BE%91

arrow
arrow
    全站熱搜

    wbkuo 發表在 痞客邦 留言(0) 人氣()