命令式修改
- 立即生效
- 仅在当前终端窗口有效,窗口关闭后无效
- 仅对当前用户有效
export PATH=${HOME}:$PATH
修改 ~/.bashrc
vim ~/.bashrc
export PATH=${HOME}:$PATH
source ~/.bashrc
修改 ~/.bash_profile
vim ~/.bash_profile
export PATH=$PATH:/home/igs
source ~/.bash_profile
修改 /etc/bashrc
chmod -v u+w /etc/bashrc
vim /etc/bashrc
export PATH=$PATH:/home/igs
source /etc/bashrc
修改 /etc/profile
chmod -v u+w /etc/profile
vim /etc/profile
export PATH=$PATH:/home/igs
source /etc/profile
修改 /etc/environment
chmod -v u+w /etc/environment
vim /etc/environment
export PATH=$PATH:/home/igs
source /etc/environment