Other Environment Variables
Ubuntu also provides many other environment variables; some of the more common ones are listed in Table 7-3.
Table 7-3. Common environment variables
Environment variable | Contents |
|---|---|
| Your home folder |
| The default language |
| The path to the |
| The system path |
| The current working directory |
| The current shell |
| The time zone |
| Your username |
Each variable’s contents can be displayed using the echo command, like this:
echo $HOMENote
Most commands require you to preface variables with a $ sign to let the operating system know that
you are referring to a variable and not just a string of
letters.
You can also use environment variables in paths, so you could list the contents of the Documents folder within your home folder using this command:
ls $HOME/DocumentsAs you can see, $HOME and the
~ operator are interchangeable.