I am trying to learn how to tweak my shell in the file but can't seems to find the file in my home directory or in
Is there any other file I need to search for, or am I expected to create one from scratch?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
If you open Nautilus, the file browser, go to your HOME directory and press CTRL+H you will see then all the hidden files (since hidden files start with the DOT
. character). Since you are talking about the
.bash_profile, I am guessing you want to start via console instead of an interactive desktop.
The difference between
.bashrc is the following:
.bashrc is the one that you edit when you want to change the way xterm or gnome-terminal open the console. how the bash works in this interactive places.
.bash_profile is the one you edit when you want to change how bash works when you login via console (Like the same way you login to a Ubuntu server or when you press CTRL+ALT+F1 to start a terminal)
.bash_profile does not come by default, you can just create it. But as I understand the default
.bash_profile is now called
.profile which can be seen in the HOME directory. Both,
.profile can be edited to change how bash works in both, interactive and console modes.
NOTE: If by some way you create
.bash_profile, then Ubuntu wont read
.profile but instead go directly to
.bash_profile since both of them are the same but
.bash_profile has more compatibility because of old ways. So basically you do not need
.bash_profile if you have
.profile. So just remember:
.bashrc - Interactive Console/Terminal (Gnome, KDE, Xfce...)
.profile - TTY Console/Terminal