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.
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.
curl "https://your-horde-server.example.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 versionStep 2 - Log In to Perforce
p4 login
# Spot-check: sync a single file to confirm your workspace view is correct
p4 -c `${client_name}` sync -q //`${client_name}`/YourProject/YourProject/*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.
# Creates a new workspace and registers the project with UGS
ugs init //YourStream/Main \
-project=/YourProject/YourProject/YourProject.uproject
# Switch project if you already have an existing workspace
ugs switch YourProject/YourProject/YourProject.uproject
# Confirm workspace is wired up correctly
ugs statusStep 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.
# From your workspace root
Engine/Build/BatchFiles/Linux/SetupToolchain.shStep 5 - Build the Editor
Use ugs build for the standard UGS-managed build, or drop down to make StandardSet for a direct Makefile build.
# 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 StandardSetStep 6 - Launch the Editor
# Via UGS
ugs run
# Direct binary (add -norelativemouse if the cursor behaves oddly)
./Binaries/Linux/UnrealEditor -norelativemouseCommon 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