How to - See the value of all your shell's environment variables using env command

As a linuxer, if you have the slightest experience of working on command line then you would have used environment variables. What’s it really? In short, they act as configuration parameters for applications or programs that we run. Depending upon where we define an environment variable, we can make it available for every application and user (global), only for a single user(local) or just for the shell we are working on(even smaller locality).

Now, since as a shell user, various commands and operations depend on the environment variables, you may want to check if the values are set correctly.

If you are interested in checking the value a single variable then just echo it.

[shredder12]$ echo $VARIABLE

For bulk look up, just type these three magic letters “env”.

[shredder12]$ env | less

“less” because a single page might not be sufficient for the output.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <p> <br>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.