This chapter tells you how to install the Perforce Command-Line Client (p4) on a client machine. For details about installing the Perforce Server, refer to the Perforce System Administrator's Guide.
Installing P4 on UNIX and OS X
To install the Perforce Command-Line Client (p4) on a UNIX or Macintosh OS X machine, perform the following steps:
- Download the p4 executable file from the Perforce web site:
The Perforce client programs are typically downloaded to /usr/local/bin.
- Make the p4 file executable (chmod +x p4)
- Configure the server port setting, client workspace name, and user name. You can specify these settings by configuring the P4PORT, P4CLIENT, and P4USER environment variables. (For details, see Chapter 2, Configuring P4.)
Installing P4 on Windows
To install the Perforce Command-Line Client (p4.exe) on Windows, download and run the Perforce Windows installer (perforce.exe) from the Downloads page of the Perforce web site:
The Perforce installer enables you to install and uninstall the Perforce Command-Line Client and other Perforce Windows components.
Verifying the installation
To verify that you have successfully installed the Perforce Command-line Client, type p4 info at the command line and press ENTER. If you have a server running on the specified host and port, the following message is displayed:
User name: ona
Client name: ona-agave
Client host: agave
Client root: /home/ona/p4-ona
Current directory: /home/ona/p4-ona
Client address: 10.0.0.196:2345
Server address: ida:1818
Server root: /usr/depot/p4d
Server date: 2005/06/13 08:46:34 -0700 PDT
Server version: P4D/FREEBSD4/2005.1/79540 (2005/05/10)
Server license: Perforce Software 200 users (expires 2007/01/31)
If your configuration settings are incorrect, the following message is displayed::
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to <hostname> failed.
<hostname>: host unknown.
Please send comments and questions about this manual to
Copyright 2005-2007 Perforce Software. All rights reserved.
Last updated: 05/21/07