bash starts up, it reads configuration files to set up the environment. These files are known as startup files.
Startup files work by first loading the default environment shared by all users. Then it loads files in the user's home directory to give a more tailored experience per user.
There are two types of shell logins: login and non-login shell sessions. Depending on which one you choose to boot your shell, a different group of startup files are executed.
For a login shell session, a username and password in necessary.
Here is the order in which the startup files are executed in a login shell.
Non-login shells inherit the environment from their parent process.
The main difference in files being executed is that login shells run .bash_profile on startup, while non-login shells run .bashrc. However, .bashrc is usually executed from .bash_profile.
Remember that the . before a file name means that it is hidden. To view hidden files, use
There is a convention of where to store certain variables when configuring your environment.
In the next section, let's talk about how to properly set environment variables so that your settings are loaded upon every login.
Linux for Beginners doesn't make any assumptions about your background or knowledge of Linux. You need no prior knowledge to benefit from this book. You will be guided step by step using a logical and systematic approach. As new concepts, commands, or jargon are encountered they are explained in plain language, making it easy for anyone to understand.$ Check price
Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.$$ Check price