一.有何作用

.bashrc - The individual per-interactive-shell startup file.

.bashrc - 主要保存个人的个性化设置,如命令别名、路径等:使得使用方便,效率提升。

二.如何使用:

1. 可以定义路径;

2. 可以定义语言;

3. 可以定义命令别名

4. 等等

三.简单实例:

# User specific aliases and functions

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

LANG=zh_CN.GBK

export PATH LANG

 

alias mkcfg='make menuconfig'

alias mkcln ='make clean'

四.如何生效

有两种方法使得.bashrc文件生效。

1. 每次修改.bashrc后,使用source ~/.bashrc(或者 . ~/.bashrc),则可以立刻加载修改后的设置,使之生效。

2. 也可以在.bash_profile文件中显式调用.bashrc。登陆linux系统启动bash时首先会去读取~/.bash_profile文件,就会使得~/.bashrc马上生效。

五.参考资料

1.linux help

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2021-07-29
猜你喜欢
  • 2021-12-17
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-08-25
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案