bash: ifconfig: command not found

2008-03-31 15:56

bash: ifconfig: command not found

解决方法
1. # /sbin/ifconfig

    [ximi@ximi_fedora ~]$ /sbin/ifconfig

或者

    [ximi@ximi_fedora ~]$ su
    口令:
    [root@ximi_fedora ximi]# /sbin/ifconfig

2. 修改 /etc/profile 文件

    [root@ximi_fedora ximi]# gedit /etc/profile

把下面if 语句注释掉

    # Path manipulation
    if [ "$EUID" = "0" ]; then
      pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
    fi

修改为:

    # Path manipulation
    #if [ "$EUID" = "0" ]; then
        pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    #fi

保存,重新启动

方法 2 不知道对其他程序或系统安全是否有影响,个人推荐方法 1 。以后有好的方法在贴上来。 ^_^.....

附上我的操作步骤:
(系统版本: Fedroa 8 内核:2.6.23)
操作步骤:
[ximi@ximi_fedora ~]$ ifconfig
bash: ifconfig: command not found
[ximi@ximi_fedora ~]$ su
口令:
[root@ximi_fedora ximi]# ifconfig
bash: ifconfig: command not found
[root@ximi_fedora ximi]# /sbin/ifconfig
eth0      Link encap:Ethernet HWaddr 00:16:76:9E:E6:3E
          inet addr:192.168.0.124 Bcast:192.168.0.255 Mask:255.255.255.0
          inet6 addr: fe80::216:76ff:fe9e:e63e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:193460 errors:0 dropped:0 overruns:0 frame:0
          TX packets:214751 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12801010 (12.2 MiB) TX bytes:161008154 (153.5 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:15255 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15255 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3810360 (3.6 MiB) TX bytes:3810360 (3.6 MiB)

virbr0    Link encap:Ethernet HWaddr 00:00:00:00:00:00
          inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b) TX bytes:6682 (6.5 KiB
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值