今天在修改了 RedHat Enterprise 5.7 的文件 /etc/profile 中 PATH 的值后,执行 source /etc/profile,然后 su、sudo、vi、gedit、find、source 等所有的命令都执行不了了,提示“xxx: command not found”,后面想了想应该是修改了 /etc/profile 中环境变量 PATH 的值引起的。
于是上网上找了找,现在标记一下,以留下次备用:
export PATH=.:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Linux系统入门学习:在Linux中修改环境变量PATH:http://www.linuxdiyf.com/linux/12267.html