1

I know some useful environment-variables like $HOME, $UID, $BASH, $LOGNAME etc. which is useful to get information in terminal/command-line with using echo(ex: echo $LOGNAME)

I want to know what are the useful Environment variables available in Ubuntu? In other words Where I can find a list of useful standard bash environment-variables for Ubuntu with their uses?

Elder Geek
  • 36,752
Pandya
  • 37,289

3 Answers3

5

Run env command on your terminal. It will list all the available environment variables.

See also the Ubuntu wiki on Environment Variables.

Also refer this question to know more about environment variables.

Avinash Raj
  • 80,446
1

Execute set command in terminal to get all environment variables.

jobin
  • 28,567
0

For a list of all standard variables in bash - even the ones that are not useful - until one day when you need them:

Search for Shell Variables in man bash in the section PARAMETERS:

LESS="+/The following variables are set by the shell" man bash
Volker Siegel
  • 13,295