Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What's the difference between bash profile and bash profile?


Asked by Byron Harris on Nov 30, 2021 FAQ



Bash shell uses a few startup files to set up the environment. These files determine certain Bash shell configurations for the shell itself and system users. In this tutorial, we’ll learn about a few startup files such as .bashrc, .bash-profile, and .profile and their differences. 2. Interactive Shells and Non-Interactive Shells
Moreover,
The.bash_profile file is a personal initialization file for configuring the user environment. The file is defined in your home directory and can be used for the following: Modifying your working environment by setting custom environment variables and terminal settings Instructing the system to initiate applications
Also Know, The.bash_profile file is another bash shell script file which we can see as a config file. It is stored at ~/.bash_profile. However, unlike the.bashrc file, it gets executed every time a user logs into a system. In simple words, it is invoked when you enter your username and password to log in on your Linux system.
One may also ask,
The most common use of the.bash_profile file is to set up custom environment variables for different users. In practice, the usage of the.bash_profile file is the same as the usage for the.bashrc file. Most.bash_profile files call the.bashrc file for the user by default. Then why do we have two different configuration files?
Also,
~/.bash_profile is only sourced by bash when started in interactive login mode. That is typically only when you login at the console (Ctrl+Alt+F1..F6), or connecting via ssh.