Why do you want one if you don't know what to put in there? You only need a .bashrc (or .profile or .bash_profile) if you actually have something you want to execute in every shell (or login shell).
But you can basically put any bash commands in those files.
A .bashrc file contains whatever default settings you want to use when you are using bash. If you don't have any particular preferences then leave it blank for now.
Typical contents of a .bashrc file includes aliases of commands you find yourself using a lot.
发布评论
评论(2)
如果您不知道该放什么,为什么还想要一个呢?如果您确实想要在每个 shell 中执行某些内容(或登录壳)。
但基本上您可以将任何 bash 命令放入这些文件中。
Why do you want one if you don't know what to put in there? You only need a
.bashrc
(or.profile
or.bash_profile
) if you actually have something you want to execute in every shell (or login shell).But you can basically put any bash commands in those files.
.bashrc
文件包含您在使用bash
时想要使用的任何默认设置。如果您没有任何特定偏好,请暂时将其留空。.bashrc 文件的典型内容包括您经常使用的命令的别名。
A
.bashrc
file contains whatever default settings you want to use when you are usingbash
. If you don't have any particular preferences then leave it blank for now.Typical contents of a .bashrc file includes aliases of commands you find yourself using a lot.