Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2026.1

# Define a client workspace

The following procedure explains how to define a client workspace. No files are synced when you create a client specification. To find out how to sync files from the depot to your workspace, see Sync files. For details about relocating files on your computer, see Reconfigure a client workspace.

Generally speaking, the client storage type cannot be changed after the client workspace is created. For example, a `readonly` client cannot be changed into a `writeable` client. To learn more, see Client workspace types in the P4 Server Administration Documentation.

To define a client workspace:

1. Specify the workspace name by setting `P4CLIENT` variable. For example, on a UNIX system:

       export P4CLIENT=bruno_ws

2. Issue the `p4 client` command.

   If you are working in a stream depot, pass in the `S _streamname` option to the `p4 client` command to specify the name of the stream to which P4 Server should bind the workspace. See Define a client workspace and bind it to the stream. The stream spec then defines the workspace view, so step 3 below does not apply to stream clients.

   P4 Server displays the client specification form in your text editor.

3. Specify (at least the minimum) settings and save the specification.

   The minimum settings you must specify to configure a client workspace are:

   - Workspace name

     The workspace name defaults to your computer’s hostname, but your computer can contain multiple workspaces. To specify the effective workspace, set `P4CLIENT`.

   - Workspace root

     The client workspace root is the top directory of your client workspace, where P4 Server stores your working copies of depot files. Be sure to set the workspace root, or you might inadvertently sync files to your computer’s root directory.

     For Windows users: when specifying a workspace root, you must include the drive letter. In addition, root is null on Windows when the client workspace is either on a disjoint drive with only `c:\` as the root or is spread over multiple drives.

     If the workspace root directory does not exist, you must create it before the P4 Server application can make use of it.

     The `@`, `#`, `*`, and `%` characters have specific meaning to P4 Server. If you have file or folder names that use these characters, see Reserved characters.

   - Workspace view

     By default, the entire depot is mapped to your workspace. You can define a workspace view (also referred to as a client view) to determine which files in the depot are mapped to your workspace. This enables P4 Server to construct a one-to-one mapping between individual depot and workspace files. You can map files to have different names and locations in your workspace than they have in the depot.

     For users of streams, P4 Server generates the workspace view from the contents of the stream spec’s `Paths` field.

     Users of classic P4 Server branches configure the workspace view by editing the contents of the client spec’s `View` field.

     For details on configuration of workspace views, see Configure workspace views.

Your search for returned results