Linux的 .bashrc 和.bash_profile和.profile文件
2016-11-02 09:34
323 查看
linux启动或是每次打开一个shell的时候都会执行用户家目录下的.bashrc文件,所有可以在这个文件里面添加一些内容,以便Linux每次启动时都会执行相应的内容。
如果ssh方式远程登录Linux时,会自动执行用户家目录下的.bash_profile文件,所有可以在这个文件里面添加一些内容,以便ssh登录Linux时都会执行相应的内容。
.profile文件在linux每次启动后,shell也会读取改文件里面的内容,该文件里面定义了环境变量PATH的值。
$ cd (进入用户登陆目录)
$ls –al .bash_profile(.bash_profile为隐藏文件,因此要用ls –a命令查找)
$vi .bash_profile(用vi编辑.bash_profile)
/etc/profile 是系统级的环境变量
其他两个都是用户级
如果ssh方式远程登录Linux时,会自动执行用户家目录下的.bash_profile文件,所有可以在这个文件里面添加一些内容,以便ssh登录Linux时都会执行相应的内容。
.profile文件在linux每次启动后,shell也会读取改文件里面的内容,该文件里面定义了环境变量PATH的值。
$ cd (进入用户登陆目录)
$ls –al .bash_profile(.bash_profile为隐藏文件,因此要用ls –a命令查找)
$vi .bash_profile(用vi编辑.bash_profile)
/etc/profile 是系统级的环境变量
其他两个都是用户级
相关文章推荐
- [alpha]linux 启动配置文件:bash_profile 和 bashrc的区别
- Linux 配置文件 启动文件rc.local、/etc/bash.bashrc、~/bashrc、/etc/profile、~/.profile加载顺序
- linux的export命令和profile,.bashrc,bash.profile各种环境变量文件
- Linux下文件 ~/.bashrc 和 ~/.bash_profile 和 /etc/bashrc 和 /etc/profile 的区别 | 用户登录后加载配置文件的顺序
- Linux下文件 ~/.bashrc 和 ~/.bash_profile 和 /etc/bashrc 和 /etc/profile 的区别 | 用户登录后加载配置文件的顺序
- linux 下/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件的区别
- Linux中 bash_profile和.bashrc的区别(启动文件)
- linux的export命令和profile,.bashrc,bash.profile各种环境变量文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- Linux中环境变量文件profile、bashrc、bash_profile之间的区别和联系
- linux系统环境变量.bash_profile/bashrc文件
- linux的环境变量文件enviroment 、profile、bashrc和.bashrc以及.bash_profile
- linux中export、ofile、bashrc、bash_profile各种环境变量文件
- 浅析linux下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc文件
- linux的环境变量文件enviroment 、profile、bashrc和bash_profile的区别
- 浅析linux下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc文件
- Linux中环境变量文件profile、bashrc、bash_profile之间的区别和联系
- Linux下配置文件 /etc/profile、/etc/bashrc、~/.bash_profile、~/.profile、~/.bashrc 总结
- Linux中环境变量文件profile、bashrc、bash_profile之间的区别和联系
- .bash_profile和.bashrc的什么区别,linux的几个环境配置文件的区别