bash configuration file location
Hi. I have forgotten where the bash config file is located on my phone. Anyone know where the file is?
Solution:Jump to solution
Your user config file for Bash should be located at
~/.bashrc
.
If that does not exist you can simply create it with your text editor of choice.
Some other ways to express that file location would be $HOME/.bashrc
,
or in the case of Termux,...2 Replies
Solution
Your user config file for Bash should be located at
~/.bashrc
.
If that does not exist you can simply create it with your text editor of choice.
Some other ways to express that file location would be $HOME/.bashrc
,
or in the case of Termux,
/data/data/com.termux/files/home/.bashrc
~
and $HOME
both resolve to the user's home directory.
There is also a system bashrc, located at:
- /etc/bash.bashrc
on a "regular" Linux system
- or $PREFIX/etc/bash.bashrc
on Termux
The absolute path to it on Termux is /data/data/com.termux/files/usr/etc/bash.bashrc
You shouldn't be using it for your personal configuration.
It's intended to set up some defaults for the distribution.
In Termux's case it just sets up shell history, a basic prompt, command-not-found
and completions if bash-completion
is installed.