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: ksh, sh, bash

P4CLIENT=value ; export P4CLIENT

UNIX: csh

setenv P4CLIENT value

Mac OS X (bash)

P4CLIENT=value ; export P4CLIENT

Windows

p4 set P4CLIENT=value

Windows administrators running Helix Server as a service can set variables for use by a specific service with p4 set -S svcnamevar=value, or set variables for all users on the local machine with p4 set -s var=value.

(See the p4 set command for more details on setting Helix Server 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.

Helix Server’s environment variables can be grouped into the following four categories:

Type Description Name
crucial must be set on the client and default values are rarely sufficient

P4CLIENT

P4PORT

P4PASSWD

P4USER

useful can provide additional functionality to the user P4CONFIG

P4DIFF

P4EDITOR

P4MERGE

P4CHARSET

P4TRUST

server set by the administrator for users or applications P4AUDIT

P4JOURNAL

P4LOG

P4PORT

P4ROOT

P4DEBUG

P4NAME

P4SSLDIR

esoteric default value is sufficient

P4PAGER

PWD

TMP, TEMP

P4TICKETS

P4LANGUAGE

P4LOGINSSO

P4COMMANDCHARSET

P4DIFFUNICODE

P4MERGEUNICODE

P4CLIENTPATH