Environment and Registry Variables
Each operating system and shell has its own syntax for setting environment
variables.The following table shows how to set the
P4CLIENT
environment variable
on various systems:
OS or Shell |
Environment Variable Example |
---|---|
UNIX: |
P4CLIENT= |
UNIX: |
setenv P4CLIENT
|
VMS |
def/j P4CLIENT
" |
Mac OS X ( |
P4CLIENT= |
Windows |
p4 set
P4CLIENT=
Windows administrators running Perforce as a service can set
variables for use by a specific service with p4 set
-S (See the p4 set command for more details on setting Perforce variables in Windows and OS X). |
Note
You may use $home
to set environment variables. For
example:
P4IGNORE=$home/myignorefile
$home
is expanded to the path of the user's home
directory. The user's home directory is taken to be the value of the
HOME
environment variable or of
USERPROFILE
on Windows.
Perforce's environment variables can be grouped into the following four categories:
-
Crucial: The variable must almost always be set on the client; default values are rarely sufficient. Understanding these variables is crucial for users and administrators alike.
-
Useful: Setting this variable can provide additional functionality to the user, but is not required for most Perforce operations.
-
Esoteric: The default value is normally sufficient; it rarely needs to be changed.
-
Server: The variable is set by the Perforce system administrator on the machine that hosts the Perforce service. Some of these variables are used by Perforce applications as well; in these cases, the variable is listed twice.
Crucial Variables |
Useful Variables |
Esoteric Variables |
Server Variables |
---|---|---|---|
Notes
The $home
placeholder may be used in any Perforce
environment setting and will be expanded to the full path of the user's
home directory. This is taken from the HOME
environment variable on all platforms expect for Windows, where
USERPROFILE
is used instead.