The .bashrc
file is not executed and will not show up as a process. Since it is a file, you can use tools to detect reads and writes.
When your shell (e.g. bash
) starts up, it 'sources' files. This means that it opens and reads the file, and runs any commands in the file. The shell process itself does this, and as you're likely aware, this allows you to set up different environment variables, aliases, functions, etc.
There are other, similar files. .profile
, .bash_profile
and .bashrc
all having slight technical differences, but similar functionality. You can see this great explanation and example of .bash_profile
vs .bashrc
. There are usually user-specific files in each user's home directory, and system configs in /etc/
, such as /etc/bash.bashrc
.
So, .bashrc
is never executed, but instead sourced each time you start a new shell terminal spawns, or whenever you manually source the file: source ~/.bashrc
.