bash: ifconfig: command not found

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
原文地址:https://www.cnblogs.com/fklin/p/2743300.html