Skip to Main Content
Ubuntu: Up and Running
book

Ubuntu: Up and Running

by Robin Nixon
April 2010
Beginner content levelBeginner
464 pages
12h 7m
English
O'Reilly Media, Inc.
Content preview from Ubuntu: Up and Running

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

HOME

Your home folder

LANG

The default language

MANPATH

The path to the man program’s manual pages

PATH

The system path

PWD

The current working directory

SHELL

The current shell

TZ

The time zone

USER

Your username

Each variable’s contents can be displayed using the echo command, like this:

echo $HOME

Note

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/Documents

As you can see, $HOME and the ~ operator are interchangeable.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu Made Easy

Ubuntu Made Easy

Rickford Grant, Phil Bull
Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull
CentOS Quick Start Guide

CentOS Quick Start Guide

Shiwang Kalkhanda

Publisher Resources

ISBN: 9781449382827Errata Page