Editor

Setting Up Unreal Engine on Linux via Perforce and UGS CLI

Full workflow for getting Unreal Engine running on a Linux machine from a Perforce stream: install the dev toolchain, init a UGS workspace, install Clang, build, and launch the editor.

linuxperforceugsugs-clibuildsetupclang

Step 1 — Install UGS CLI

UGS CLI (ugs) replaces the GUI UnrealGameSync client on Linux. Install it with a single command then verify it is on your PATH.

bash
curl "https://horde.devtools.epicgames.com/api/v1/tools/ugs-linux?action=download" \
  -o ~/ugs.zip && \
  unzip -eo ~/ugs.zip -d ~/ugs/ && \
  ~/ugs/ugs install && \
  source ~/.bashrc

# Verify — prints the current stream and CL
ugs version

Step 2 — Log In to Perforce

bash
p4 login

# Spot-check: sync a single file to confirm your workspace view is correct
p4 -c `${client_name}` sync -q //`${client_name}`/Sandbox/VirtualProduction/QAVirtualProduction/*

Step 3 — Initialise a UGS Workspace

Run ugs init from the directory where you want the workspace root, passing the Perforce stream and the .uproject you want to target.

bash
# Creates a new workspace and registers the project with UGS
ugs init //UE5/Release-5.7 \
  -project=/Sandbox/VirtualProduction/QAVirtualProduction/QAVirtualProduction.uproject

# Switch project if you already have an existing workspace
ugs switch Sandbox/VirtualProduction/QAVirtualProduction/QAVirtualProduction.uproject

# Confirm workspace is wired up correctly
ugs status

Step 4 — Install the Clang Toolchain

Unreal ships a cross-platform toolchain script. Run it once after your initial sync — it downloads the exact Clang version required by the engine.

bash
# From your workspace root
Engine/Build/BatchFiles/Linux/SetupToolchain.sh
If you are using AutoSDK / ushell, you can replace this step with: .autosdks sync .project QAVirtualProduction This fetches and activates the correct SDK automatically.

Step 5 — Build the Editor

Use ugs build for the standard UGS-managed build, or drop down to make StandardSet for a direct Makefile build.

bash
# Recommended: let UGS handle the build steps
ugs build

# List individual build steps if you only need a subset
ugs build -list

# Alternative: direct Makefile build from workspace root
make StandardSet

Step 6 — Launch the Editor

bash
# Via UGS
ugs run

# Direct binary (add -norelativemouse if the cursor behaves oddly)
./Binaries/Linux/UnrealEditor -norelativemouse

Common UGS CLI Reference

  • ugs sync latest — sync to the latest CL
  • ugs sync <CL> -clean — sync to a specific CL and clean the workspace
  • ugs sync latest -build — sync then build in one command
  • ugs filter exclude=<path> — exclude a path from future syncs
  • ugs filter global include=<path> — apply a sync filter to all workspaces
Permissions tip: if the build fails due to file permission errors, fix them with: sudo chmod -R 777 /home/<user>/P4V/<workspace>/ Note: .bashrc and sudo .bashrc are separate — aliases added to one are not visible to the other.