Managing Environment Variables (export, unset)
Learn to set, export, and unset environment variables, understanding their scope and impact on programs.
What Are Environment Variables?
Welcome! Today we'll explore environment variables, a core concept in Linux. Think of them as special values that your shell and programs can read to configure their behavior.
They're like global settings for your command-line environment.
Viewing Existing Variables
You already have many environment variables set! You can view them using the printenv or env commands. Let's see a few:
printenv | head -n 5All 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