Shell、bashrc 和 fish
💡
原文英文,约400词,阅读约需2分钟。
📝
内容提要
Bash是Bourne-Shell的替代品,使用时需注意登录shell和非登录shell的配置文件加载顺序。应在~/.bash_profile中引用~/.bashrc。fish shell也值得尝试,但存在一些问题。
🎯
关键要点
- Bash是Bourne-Shell的替代品,称为Bourne-Shell-Again-Shell。
- Bash和其他shell(如dash)在以sh名称调用时会变得更符合POSIX标准。
- 登录shell的配置文件加载顺序为:/etc/profile -> ~/.bash_profile -> ~/.bash_login -> ~/.profile。
- 非登录shell的配置文件为:/etc/bash.bashrc -> ~/.bashrc。
- 使用bash作为登录shell时,~/.bashrc不会被加载,需要在~/.bash_profile中引用。
- fish shell值得尝试,但存在一些问题。
➡️