TOPIC LINUX
Shell Startup Chain .bashrc vs .profile
IN 10 SECONDS
Linux shells read startup configuration files. Interactive login shells load /etc/profile then ~/.bash_profile, while non-login subshells load ~/.bashrc directly.
GOTCHA Placing configurations in .bash_profile alone will prevent them from loading inside graphical terminal sessions or remote VSCode subshells.
HOW STARTUP INITIALIZATION FLOWS
01 Login Shell SSH login starts, reading profile configurations to initialize shell environment.
02 Interactive subshell user opens a new terminal window inside current session, skipping profile.
03 Rc Load shell loads ~/.bashrc to configure custom shell variables, aliases, and terminal colors.
04 Ready Prompt shell displays prompt, waiting for user instructions.
POKE IT YOURSELF
source ~/.bashrc — reload bash configuration settings in the current session
bash --login — start a new bash shell simulating interactive login credentials
Drill this topic →
~70 sec read