If I use the env command, do I get to see any environment variables I created?

Question

If I use the env command, do I get to see any environment variables I created?

Answer

That is correct, the environment command will return all the environment variables that it contains, and that counts the ones that we have created either by writing in the .bash_profile or using the export command which gets a value: name and value of the variable, ie.: export L="ls -l" now when we can use it to get a long list of files from the directory (we need to make sure the value is in string form).

At the end of the day, the environment is made of environment variables, which get defined as our computer runs its necessary command when it boots up.

13 Likes