1.在Terminal输入命令,报错"command not found":
以ifconfig为例
1)输入"which ifconfig"找到该命令在系统中所在的目录:
/sbin/ifconfig
2)编辑.bash_profile:vi ~/.bash_profile
在变量PATH后添加":/sbin",保存退出
3)source ~/.bash_profile使配置生效。然后就可以在Terminal正常使用。
1.在Terminal输入命令,报错"command not found":
以ifconfig为例
1)输入"which ifconfig"找到该命令在系统中所在的目录:
/sbin/ifconfig
2)编辑.bash_profile:vi ~/.bash_profile
在变量PATH后添加":/sbin",保存退出
3)source ~/.bash_profile使配置生效。然后就可以在Terminal正常使用。