一、在家目录创建 .bash_profile 文件。bash
二、在该文件添加:spa
export PATH=/my/path/:$PATH
三、解释,/my/path/为你要添加的目录,为何不在.bashrc中修改?由于根据规则,.bashrc在.bash_profile中调用,实际系统指执行.bash_profilecode