linux 环境变量设置错误导致 command not found

在~/.bashrc 或者/etc/profile 中设置的环境变量有问题 会导致 诸如:linux bash: dircolors: command not found 、bash: vi: command not found这样的问题

解决办法:使用 export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin

             然后关闭终端重新打开一个终端,会让刚才找不到的command短暂可用,特此记录

原文地址:https://www.cnblogs.com/andyboy/p/5156959.html