Start up the command line client

  1. Change to your working directory.

    This is the working directory you created in Create a working directory.

    On UNIX and macOS

    cd /Users/bruno/tutorial

    On Windows

    cd C:\Users\bruno\tutorial
  2. Set the P4PORT environment variable

    The server is running as localhost on port 1666. For the client to communicate with the server, you must set the client’s P4PORT variable to localhost:1666.

    On UNIX and macOS with the bash shell:

    export P4PORT=localhost:1666

    On Windows

    p4 set P4PORT=localhost:1666
  3. Start up the command line client.

    p4

    This produces the following output, followed by a list of help commands.

    Perforce -- the Fast Software Configuration Management System.
    
    p4 is Perforce's client tool for the command line.