Linux Bash Profile File Configuration with Examples
Linux bash profile is used to set some default or startup configuration about user accounts and bash. We have previously examined the
.bashrc which resides in user home directory. In this tutorial we will look the
/etc/profile or bash_profile. Bash_profile will effect to the whole system configuration.
Bash profile can be printed or edited like below.
$ cat /etc/profile
There are different bash configuration files in Linux distributions. They have execution sequence and the later ones will override previous configurations if they collapses.
We can configuration what ever we want like a
.bashrc file but keep in mind that this is a global file and all configuration will affect to the all user accounts.
Actually the execution starts with
/etc/profile file and all other bash_profile configuration files are configured in the
/etc/profile file in the given sequence. For detailed examples please look following tutorial.
Multiple File Configuration
If we want to add detailed configuration to the bash_profile it may become messy. We can use
/etc/profile.d directory to put bash_profile configuration files where all of them treated like they are in the
/etc/profile and executed in a row.