Linux 创建一个基本的 .bashrc 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9349108/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Create a basic .bashrc file
提问by Lynob
I don't have .bashrc
file, I want to create one but how? And what does a basic .bashrc
file contains? I am on Linux Mint 12
我没有.bashrc
文件,我想创建一个,但如何创建?基本.bashrc
文件包含什么?我在Linux Mint 12 上
I want to have a .bashrc
file, because i have created a folder for virtualenv
and I want to load virtualenvwrapper
我想要一个.bashrc
文件,因为我已经创建了一个文件夹virtualenv
,我想加载virtualenvwrapper
采纳答案by sverre
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.
一个.bashrc
文件包含您在使用bash
. 如果您没有任何特别的偏好,那么暂时将其留空。
Typical contents of a .bashrc file includes aliases of commands you find yourself using a lot.
.bashrc 文件的典型内容包括您经常使用的命令的别名。
回答by ThiefMaster
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).
如果你不知道在那里放什么,你为什么想要一个?如果您确实想要在每个 shell(或登录 shell)中执行某些操作,则只需要一个.bashrc
(or .profile
or .bash_profile
)。
But you can basically put any bash commands in those files.
但是您基本上可以将任何 bash 命令放在这些文件中。