.bashrc is the primary configuration file for the bash shell.
Questions tagged [bashrc]
448 questions
1338
votes
12 answers
How to correctly add a path to PATH?
I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.
This way:
export PATH=~/opt/bin:$PATH
or this?
export…
Paolo
- 16,955
- 11
- 31
- 40
345
votes
4 answers
What does "rc" in .bashrc stand for?
Is it "resource configuration", by any chance?
Lazer
- 34,477
- 25
- 70
- 75
270
votes
3 answers
What is the purpose of .bashrc and how does it work?
I found the .bashrc file and I want to know the purpose/function of it. Also how and when is it used?
Pandya
- 23,898
- 29
- 92
- 144
162
votes
21 answers
How can I set my default shell to start up tmux
I would like my default bash shell to go straight into tmux instead of my always having to type tmux every time.
Michael Durrant
- 41,213
- 69
- 165
- 232
104
votes
2 answers
What is the difference between interactive shells, login shells, non-login shell and their use cases?
Possible Duplicate:
Difference between Login Shell and Non-Login Shell?
I have been looking at /etc/profile. bash.bashrc to see how they are run, and notice that some are executed by non-login shells, some work with interactive shells etc.
What…
vfclists
- 7,215
- 14
- 51
- 79
95
votes
8 answers
Is it possible to check where an alias was defined?
An alias, such as ll is defined with the alias command.
I can check the command with things like type ll which prints
ll is aliased to `ls -l --color=auto'
or command -v ll which prints
alias ll='ls -l --color=auto'
or alias ll which also…
polemon
- 11,133
- 11
- 69
- 111
77
votes
3 answers
What is the difference between ~/.profile, ~/.bashrc, ~/.bash_profile, ~/.gnomerc, /etc/bash_bashrc, /etc/screenrc ...?
Answers to the questions on SO and askubuntu, along with poking through (and reading headers of) $HOME and /etc/, indicate a number of files that can be used to set environment variables, including:
~/.profile
~/.bashrc
~/.bash_profile…
Abe
- 1,681
- 2
- 13
- 8
77
votes
3 answers
Refresh aliases and functions after defining new aliases and functions?
When I define a new alias in .bash_aliases file or a new function in .bashrc file, is there some refresh command to be able immediately use the new aliases or functions without closing the terminal (in my case xfce4-terminal with a few tabs open,…
xralf
- 16,149
- 29
- 101
- 149
69
votes
3 answers
Using export in .bashrc
I have noticed in my .bashrc that some lines have export in front of them, such as
export HISTTIMEFORMAT="%b-%d %H:%M "
...
export MYSQL_HISTFILE="/root/.mysql_history"
whereas others don't, such as
HISTSIZE=100000
I am wondering if, first,…
Martin Vegter
- 69
- 66
- 195
- 326
50
votes
4 answers
How can I create a local function in my bashrc?
My .bashrc had some code that was repetitive so I used a function to simplify it
do_stuff() {
local version=$1
export FOO_${version}_X="17"
export FOO_${version}_Y="42"
}
do_stuff '5.1'
do_stuff '5.2'
However, now when I use my shell the…
hugomg
- 5,543
- 4
- 35
- 53
46
votes
5 answers
How do I get rid of Cygwin's /cygdrive prefix in all paths?
I'm switching to Cygwin from the bash shell that ships with Git for Windows, and encountering a strange problem. Someone thought it would be a good idea to add /cygdrive/ to all paths, while I think it's a horribly ugly idea. I've been able to…
iconoclast
- 9,057
- 12
- 56
- 95
40
votes
4 answers
How can I find a rogue alias declaration?
I'm trying to find where a specific alias has been declared. I've searched all the usual places I know to look for aliases:
~/.bashrc
~/.bash_profile
/etc/bashrc
/etc/profile
With no luck.
I know it's an alias because when I do which COMMAND, I…
user3520
39
votes
3 answers
sudo command doesn't source /root/.bashrc
I have added a custom path to PATH variable in my /root/.bashrc file
When i do sudo su; echo $PATH, it shows the entry, '/path/to/custom/bins'.
But i do sudo sh -c 'echo $PATH', it shows,…
user93868
36
votes
4 answers
Global bash_profile
I realize there are /etc/profile and /etc/bashrc files for setting global environment variables and maybe I'm just misunderstanding their purposes, but...
Is there a global bash_profile file?
I'm using Mac OS X
user23312
34
votes
1 answer
What's the difference between .bashrc and .inputrc
I am new to the unix system, and find it interesting to create customized functions and configurations in the setting files like .bashrc and .inputrc.
However, I don't understand the differences between the two. For example, when I created alias, I…
Counter10000
- 455
- 1
- 4
- 7