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,023
  • 25
  • 98
  • 183
Pandya
  • 35,771
  • 44
  • 128
  • 188

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
  • 78,556
  • I found http://askubuntu.com/questions/275965/how-to-list-all-variables-names-and-their-current-values link on https://help.ubuntu.com/community/EnvironmentVariables but not in related Question when asking. Then What is about my question (Is it can be different? or Duplicate?) – Pandya May 25 '14 at 07:13
1

Execute set command in terminal to get all environment variables.

jobin
  • 27,708
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,065
  • 5
  • 49
  • 65