不灭的焱

革命尚未成功,同志仍须努力下载JDK17

作者:php-note.com  发布于:2021-06-01 17:38  分类:Linux基础  编辑

Linux环境变量设置/etc/profile、/etc/bashrc、~/.profile、~/.bashrc区别

~/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

~/.profile

无此文件

~/.bashrc

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi