Introduction
When you open a terminal on Linux, some files run commands automatically to set up your environment. Two important files for this are .bashrc and .bash_profile. They help customize your terminal experience by running scripts when you start a shell session.
When you want to add custom commands or shortcuts that run every time you open a new terminal window.
When you want to set environment variables like PATH only once when you log in.
When you want to run commands for interactive shells but not for login shells.
When you want to make sure your terminal looks and behaves the same every time you start it.
When you want to fix issues where some commands work in one terminal but not another.