Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Environment variable
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==={{anchor|UNIX-ENV}}Unix === {{anchor|$PATH}} {{See also|Path (computing)}} ;<code>$PATH</code>: Contains a colon-separated list of directories that the shell searches for commands that do not contain a slash in their name (commands with slashes are interpreted as file names to execute, and the shell attempts to execute the files directly). It is equivalent to the [[DOS]], [[OS/2]] and [[Microsoft Windows|Windows]] <code>[[#%PATH%|%PATH%]]</code> variable. ;{{anchor|$HOME}}<code>$HOME</code>: Contains the location of the user's [[home directory]]. Although the current user's home directory can also be found out through the C-functions <code>getpwuid</code> and <code>getuid</code>, <code>$HOME</code> is often used for convenience in various shell scripts (and other contexts). Using the environment variable also gives the user the possibility to point to another directory. ;{{anchor|$PWD}}<code>$PWD</code>: This variable points to the current directory. Equivalent to the output of the command pwd when called without arguments. ;{{anchor|$DISPLAY}}<code>$DISPLAY</code>: Contains the identifier for the display that [[X11]] programs should use by default. ;{{anchor|$LD_LIBRARY_PATH}}<code>$LD_LIBRARY_PATH</code>: On many Unix systems with a [[dynamic linker]], contains a colon-separated list of directories that the dynamic linker should search for [[shared object]]s when building a process image after <code>exec</code>, before searching in any other directories. ;{{anchor|$LIBPATH}}<code>$LIBPATH</code> or <code>$SHLIB_PATH</code>: Alternatives to <code>$LD_LIBRARY_PATH</code> typically used on older Unix versions. ;{{anchor|$LANG|$LC_ALL|$LC_CTYPE|$LC_COLLATE|$LC_DATE}}<code>$LANG, $LC_ALL, $LC_...</code>: <code>$LANG</code> is used to set to the default [[Locale (computer software)|locale]]. For example, if the locale values are <code>pt_BR</code>, then the language is set to (Brazilian) Portuguese and Brazilian practice is used where relevant. Different aspects of localization are controlled by individual <code>$LC_</code>-variables (<code>$LC_CTYPE</code>, <code>$LC_[[collation|COLLATE]]</code>, <code>$LC_DATE</code> etc.). <code>$LC_ALL</code> can be used to force the same locale for all aspects. ;{{anchor|$TZ}}<code>$TZ</code>: Refers to [[time zone]]. It can be in several formats, either specifying the time zone itself or referencing a file (in <code>/usr/share/zoneinfo</code>). ;{{anchor|$BROWSER}}<code>$BROWSER</code>: Contains a colon-separated list of a user's [[web browser]] preferences, for use by programs that need to allow the user to view content at a [[URL]]. The browsers in the list are intended to be attempted from first to last, stopping after the first one that succeeds. This arrangement allows for fallback behavior in different environments, e.g., in an [[X Window System|X11]] environment, a graphical browser (such as [[Firefox]]) can be used, but in a console environment a terminal-base browser (such a [[Lynx (web browser)|Lynx]]) can be used. A <code>%s</code> token may be present to specify where the URL should be placed; otherwise the browser should be launched with the URL as the first argument.<ref name="ESR_2002_BROWSER"/><ref name="LWN_2001_BROWSER"/><ref name="PERL_ENV_BROWSER"/><ref name="PYTHON_WEBBROWSER"/><ref name="DEBIAN_DFLT_WEB_BROWSER"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)