
fatmawati achmad zaenuri/Shutterstock.com
To list all the environment variables on a Linux computer, use the printenv command. Pipe it into the less command to get searchable results, or use grep to print specific variables.
On Linux, environment variables hold important values and settings. Scripts, applications, and shells read these values, often to configure themselves, or to control their behavior. Here are several ways to show those variables in your terminal.
All About Environment Variables
Our various test computers have an average of 50 environment variables on each of them. An environment variable, like any other variable, is a combination of a name and a value. The name is unique, set when the variable is created, and it last for the lifetime of the environment variable.
Variables hold values for us. When a process needs to know what the value is, it looks up the variable by name, and reads the value from it. Although variable names cannot be changed, their values can be.
You won’t often change system environment variables, but you can if you need to. For example, you might like to increase…
Read Full Article Source