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?

3 Answers 3

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.

1
1

Execute set command in terminal to get all environment variables.

0
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.