Shell Startup Files (.bashrc, .profile)
Explore the purpose and execution order of common shell startup files for persistent configuration.
Shell Startup Files Intro
When you open a terminal, your shell doesn't just appear blank! It loads settings, defines shortcuts, and sets up your environment. These actions are controlled by special "startup files."
These files are like configuration scripts that run automatically when a new shell session begins, personalizing your command-line experience.
Interactive vs. Non-interactive
Shells can be interactive or non-interactive.
- Interactive: You type commands and get immediate feedback (e.g., your terminal).
- Non-interactive: A script runs in the background without user input.
Different startup files are read depending on whether the shell is interactive or not.
All lessons in this course
- Managing Environment Variables (export, unset)
- Shell Startup Files (.bashrc, .profile)
- Package Management (apt, yum, pacman)
- Understanding and Customizing the PATH Variable