---
name: "environ"
section: "7"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/environ/7"
---

# environ(7)

user environment

## NAME

**environ** – user environment

## SYNOPSIS

*extern* *char* *\*\*environ*;

## DESCRIPTION

An array of strings, called the *environment* is made available to each process by [execve(2)](/execve/2.md) when a process begins. By convention these strings have the form *name*=*value*, and are referred to as “environment variables”. A process can query, update, and delete these strings using the [getenv(3)](/getenv/3.md), [setenv(3)](/setenv/3.md), and [unsetenv(3)](/unsetenv/3.md) functions, respectively. The shells also provide commands to manipulate the environment; they are described in the respective shell manual pages.

What follows is a list of environment variables typically seen on a UNIX system. It includes only those variables that a user can expect to see during their day-to-day use of the system, and is far from complete. Environment variables specific to a particular program or library function are documented in the ENVIRONMENT section of the appropriate manual page.

## ENVIRONMENT

- ARCHLEVEL

  On *amd64*, controls the level of SIMD enhancements used. See [simd(7)](/simd/7.md) for details.

- BLOCKSIZE

  The size of the block units used by several disk-related commands, most notably [df(1)](/df/1.md), [du(1)](/du/1.md) and [ls(1)](/ls/1.md). BLOCKSIZE may be specified in units of a byte by specifying a number, in units of a kilobyte by specifying a number followed by ‘K’ or ‘k’, in units of a megabyte by specifying a number followed by ‘M’ or ‘m’, and in units of a gigabyte by specifying a number followed by ‘G’ or ‘g’. Sizes less than 512 bytes or greater than a gigabyte are ignored. This variable is processed by the [getbsize(3)](/getbsize/3.md) function.

- COLUMNS

  The user's preferred width in column positions for the terminal. Utilities such as [ls(1)](/ls/1.md) and [who(1)](/who/1.md) use this to format output into columns. If unset or empty, utilities will use an [ioctl(2)](/ioctl/2.md) call to ask the terminal driver for the width.

- EDITOR

  Default editor name.

- EXINIT

  A startup list of commands read by [ex(1)](/ex/1.md) and [vi(1)](/vi/1.md).

- EXTERROR\_VERBOSE

  Request the [err(3)](/err/3.md) and uexterr\_gettext functions to unconditionally report additional information, mostly useful for the (kernel) developer to diagnose the issue. See [err(3)](/err/3.md) and [exterror(9)](/exterror/9.md) for more details.

- HOME

  A user's login directory, set by [login(1)](/login/1.md) from the password file [passwd(5)](/passwd/5.md).

- LANG

  This variable configures all programs which use [setlocale(3)](/setlocale/3.md) to use the specified locale unless the LC\_\* variables are set.

- LC\_ALL

  Overrides the values of LC\_COLLATE, LC\_CTYPE, LC\_MESSAGES, LC\_MONETARY, LC\_NUMERIC, LC\_TIME and LANG.

- LC\_COLLATE

  Locale to be used for ordering of strings.

- LC\_CTYPE

  Locale to be used for character classification (letter, space, digit, etc.) and for interpreting byte sequences as multibyte characters.

- LC\_MESSAGES

  Locale to be used for diagnostic messages.

- LC\_MONETARY

  Locale to be used for interpreting monetary input and formatting output.

- LC\_NUMERIC

  Locale to be used for interpreting numeric input and formatting output.

- LC\_TIME

  Locale to be used for interpreting dates input and for formatting output.

- MAIL

  The location of the user's mailbox instead of the default in /var/mail, used by [mail(1)](/mail/1.md), [sh(1)](/sh/1.md), and many other mail clients.

- MANPATH

  The sequence of directories, separated by colons, searched by [man(1)](/man/1.md) when looking for manual pages.

- NLSPATH

  List of directories to be searched for the message catalog referred to by LC\_MESSAGES. See [catopen(3)](/catopen/3.md).

- PAGER

  Default paginator program. The program specified by this variable is used by [mail(1)](/mail/1.md), [man(1)](/man/1.md), [ftp(1)](/ftp/1.md), etc, to display information which is longer than the current display.

- PATH

  The sequence of directories, separated by colons, searched by [csh(1)](/csh/1.md), [sh(1)](/sh/1.md), [system(3)](/system/3.md), [execvp(3)](/execvp/3.md), etc, when looking for an executable file. PATH is set to \`\`/usr/bin:/bin'' initially by [login(1)](/login/1.md).

- POSIXLY\_CORRECT

  When set to any value, this environment variable modifies the behaviour of certain commands to (mostly) execute in a strictly POSIX-compliant manner.

- PRINTER

  The name of the default printer to be used by [lpr(1)](/lpr/1.md), [lpq(1)](/lpq/1.md), and [lprm(1)](/lprm/1.md).

- PWD

  The current directory pathname.

- SHELL

  The full pathname of the user's login shell.

- TERM

  The kind of terminal for which output is to be prepared. This information is used by commands, such as [nroff(1)](/nroff/1.md) (*ports/textproc/groff*) or [plot(1)](/plot/1.md) which may exploit special terminal capabilities. See */usr/share/misc/termcap* ([termcap(5)](/termcap/5.md)) for a list of terminal types.

- TERMCAP

  The string describing the terminal in TERM, or, if it begins with a '/', the name of the termcap file. See TERMPATH below, and [termcap(5)](/termcap/5.md).

- TERMPATH

  A sequence of pathnames of termcap files, separated by colons or spaces, which are searched for terminal descriptions in the order listed. Having no TERMPATH is equivalent to a TERMPATH of *$HOME/.termcap:/etc/termcap*. TERMPATH is ignored if TERMCAP contains a full pathname.

- TMPDIR

  The directory in which to store temporary files. Most applications use either */tmp* or */var/tmp*. Setting this variable will make them use another directory.

- TZ

  The timezone to use when displaying dates. The normal format is a pathname relative to */usr/share/zoneinfo*. For example, the command

  ```
  env TZ=America/Los_Angeles date
  ```

  displays the current time in California. See [tzset(3)](/tzset/3.md) for more information.

- USER

  The login name of the user. It is recommended that portable applications use LOGNAME instead.

Further names may be placed in the environment by the **export** command and *name=value* arguments in [sh(1)](/sh/1.md), or by the **setenv** command if you use [csh(1)](/csh/1.md). It is unwise to change certain [sh(1)](/sh/1.md) variables that are frequently exported by *.profile* files, such as MAIL, PS1, PS2, and IFS, unless you know what you are doing.

The current environment variables can be printed with [env(1)](/env/1.md), [set(1)](/set/1.md) or [printenv(1)](/printenv/1.md) in [sh(1)](/sh/1.md) and [env(1)](/env/1.md), [printenv(1)](/printenv/1.md) or the **printenv** built-in command in [csh(1)](/csh/1.md).

## SEE ALSO

[cd(1)](/cd/1.md), [csh(1)](/csh/1.md), [env(1)](/env/1.md), [ex(1)](/ex/1.md), [login(1)](/login/1.md), [printenv(1)](/printenv/1.md), [sh(1)](/sh/1.md), [execve(2)](/execve/2.md), [err(3)](/err/3.md), [execle(3)](/execle/3.md), [getbsize(3)](/getbsize/3.md), [getenv(3)](/getenv/3.md), [setenv(3)](/setenv/3.md), [setlocale(3)](/setlocale/3.md), [system(3)](/system/3.md), [termcap(3)](/termcap/3.md), [termcap(5)](/termcap/5.md), [simd(7)](/simd/7.md), [exterror(9)](/exterror/9.md)

## HISTORY

The **environ** manual page appeared in Version 7 AT&T UNIX.
