From the course: Linux: Shells and Processes

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Make shell variables persistent

Make shell variables persistent - Linux Tutorial

From the course: Linux: Shells and Processes

Make shell variables persistent

- [Instructor] It's important to note that setting shell or environment variables in the command line is temporary and does not survive a reboot. To make variable assignments persistent, you need to add them to one of the Bash startup files. The complex part is knowing which startup file to add the variables to. Bash stores its configuration settings in multiple files, and to make matters worse, different files are processed depending on how the shell starts. I will try to clarify this process for you now. You can log into a Linux Shell either on a console running on a machine without a graphical interface or through a remote SSH connection. In either case, you'll be prompted for a password. Once you've logged in, you can run commands. Both of these methods are considered interactive login shells. Interactive because you will be typing in commands and getting responses back, and login because you have to authenticate.…

Contents