As a full-stack developer working across web, desktop and cloud architectures over the past decade, I‘ve amassed considerable Linux expertise for both servers and desktops. In my journey from amateur penguin tinkerer to professional coder, no single challenge has taught me more about the operating system‘s quirks and capabilities than getting games to run smoothly across distros.

Gaming on Linux has come a long way thanks to Valve‘s Proton compatibility tool. But under Steam‘s slick UI lies a labyrinth of folders and Wine prefixes bewildering enough to make Theseus weep. This article will guide you through that maze.

First we‘ll unmask the mysterious directories underlying every Steam library. Then we‘ll cover advanced troubleshooting and customization to wield total control over your Linux game collection.

So buckle up for a behind-the-scenes tour through the surprisingly complex nextwork of file systems fueling PC gaming‘s future.

Steam‘s Linux Gaming Growth

Since introducing Proton in 2018, Valve has aggressively expanded Steam‘s Linux game catalog from under 1,000 titles to over 8,000 as of February 2023.

Triple-A blockbusters like God of War, Spiderman and Cyberpunk 2077 now run flawlessly via Wine translation layers. And anti-cheat support has unlocked multiplayer favorites like Apex Legends, Destiny 2 and PUBG.

Steam Linux Game Growth

(Linux game data via Gaming on Linux)

The upcoming Steam Deck handheld, which runs Linux under the hood, gives developers further incentive to build native Linux clients. Porting houses like Feral Interactive are also bringing Windows-only hits like Total War and Tomb Raider to penguin turf.

But for less tech-savvy gamers, Steam‘s expanding compatibility introduces a new headache – where the heck are my game files?

The Steam Library Labyrinth

From the user‘s perspective, Steam presents a unified game library on Linux. Click and play. Proton magically runs Windows titles alongside native ports.

But behind that glossy veneer, Linux divides your collection across several distinct file systems:

  • Native Linux game installs reside under ~/.steam/steamapps/common, similar to Windows and macOS.
  • Windows games run via Proton translation layers and Wine virtual drives under ~/.steam/steamapps/compatdata.
  • Shared game resources also live under ~/.local/share/Steam/steamapps/common
  • User data like saves get squirreled away in ~/.local/share/Steam/userdata.

Oh, and good luck figuring out whichprefix configuration powers each Steam Play title!

This under-the-hood labyrinth bewilders average users and even experienced coders. But navigating Steam‘s core Linux gaming directories rewards you with complete control over every byte in your library.

Take the red pill, and I‘ll guide you down the rabbit hole.

Steam Library Dissected: Key Directories

Like Windows Registry keys or Docker container configs, Steam‘s Linux files appear cryptic yet follow consistent internal logic. Core folders for gaming include:

Native Linux Game Installs

/home/<user>/.steam/steam/steamapps/common

Contains numbered subfolders per AppID with all game data like executables, graphics, etc.

Fully self-contained Linux game folders live here.

Windows/Steam Play Game Installs

/home/<user>/.steam/steam/steamapps/compatdata/<App ID #>

Holds Wine prefixes with entire Windows C:\ drives per game. Program Files here.

Windows games install under Wine virtual drive.

Shared Game Resources

/home/<user>/.local/share/Steam/steamapps/common

Symlinks files used by both Linux and Steam Play game versions.

Some games have assets accessed by all release types.

User Data: Saves, Screenshots Etc

/home/<user>/.local/share/Steam/userdata/<User ID>

Per-game folders with save data, configs, screenshots etc.

If not found under game folders directly.

That covers the critical directories. Now let‘s unpack what happens under the hood when you install games on Steam for Linux.

Native Linux Game Install Procedure

When installing a native Linux game through Steam, the process looks much like Windows:

  1. Game downloads to ~/.steam/steam/ (by default)
  2. Upon install, final files get extracted into:
    /steamapps/common/<App ID>
  3. Launcher scripts, binaries, libraries get put here
  4. Game directly accesses assets and saves in this folder

For native titles, the underlying Linux file system remains exposed. Game engines rely on Linux graphics APIs like Vulkan, Open GL/ES and SDL2 to render directly on your GPU.

Benefits:

  • Max performance
  • Lean install size
  • Avoid Wine/Proton overhead
  • Native launcher and configurations

Downsides:

  • Requires official Linux port

Thankfully the numbers of native games released on Steam for Linux grows daily. But the vast majority still launch solely on Windows.

Enter Valve‘s Steam Play compatibility tools…

Steam Play Windows Game Install Routine

To run Windows games on Linux desktops and laptops, Steam leverages Proton – a custom Wine derivative integrated directly into Steam.

When you install a Windows game on Steam for Linux, this sequence occurs behind the scenes:

  1. Steam downloads the game installer image
  2. A hidden Wine prefix gets generated
  3. Windows C drive emulated under prefix location
  4. Game setup .exe runs through Wine translation
  5. Windows files extract onto virtual C drive
  6. Prefix configured with necessary libraries/components
  7. Windows registry mods applied for the game
  8. Custom launcher scripts generated

Rather than extracting directly into Linux folders, Windows games unpack within a Wine bottle. This virtual Windows environment redirects API calls through Proton, "translating" DirectX functions into Vulkan, OpenGL and other Linux-friendly graphics libraries.

The result? Near-flawless execution for thousands of Windows games like they run natively within Steam.

Benefits of Steam Play:

  • Run almost any Windows game on Linux
  • Performance nearly on par with Windows
  • Transparent compatibility integrated into Steam

Downsides:

  • Install sizes larger
  • Slight overhead from layering Wine/DXVK
  • Game-specific tweaking sometimes needed

Now that you understand Linux vs. Windows Steam installation processes better…let‘s dive into the specific folders that house everything!

Map of Linux Steam Directories

If Steam‘s root install folders seem intimidatingly vague, perhaps a diagram will help:

<img src="https://i.postimg.cc/05FcsQdP/steam-folder-map.png" alt="Diagram of Primary Steam Folders on Linux" width="800 height="450">

Okay, still pretty busy! But focus on the main boxes:

  • Common Paths hold actual game data
  • compatdata stores Windows games under virtual Wine drives
  • userdata has personal stuff like saves and screenshots

These core directories contain all your games and preferences. Everything else supports or enhances them.

Within each box, folders follow Windows filesystem concepts to remain consistent across platforms:

  • Program Files hold games
  • Documents has saves and configs

Once you learn the translation keys, Steam‘s Linux maze gets easier to navigate.

Now let‘s move onto actually finding your content buried within all those folders…

Locating Linux Native Game Installs

For games with official Linux server and client builds, accessing files is straightforward. Everything related to the title installs under:

/home/<user>/.steam/steam/steamapps/common/<AppID>

For example:

/home/john/.steam/steam/steamapps/common/440

This houses Valve‘s own Team Fortress 2 – App ID 440.

To access any native Linux game:

  1. Right click in Steam and select Properties
  2. Click the Local Files tab > Browse Local Files
  3. Opens file manager directly into install directory

From here you can freely edit:

  • Game engine configs
  • Official assets and resources
  • Save files
  • Mods
  • Custom launch scripts

If tweaking configs or modding, stick to the same file structure standards as Windows or macOS builds if possible. This maintains cross-platform compatibility for most titles.

But otherwise you have full control over Linux game folders. Now things diverge for Windows games running through Steam…

How Steam Play Installs Windows Games on Linux

Thanks to Proton and underlying Wine infrastructure, Steam seamlessly runs thousands of Windows games on Linux distros like Ubuntu, Mint, Arch, etc.

The key to achieving this magic comes down to file structure more than anything.

Rather than dumping Windows game files directly amid Linux folders, Steam Play isolates titles by:

  1. Making a hidden Windows C drive using Wine prefixes
  2. Installing games into this Wine C drive per normal Windows flow
  3. Custom Proton builds translate Windows ABI calls to Linux equivalents
  4. Vulkan replaces DirectX for graphics rendering

So Windows games deploy onto Steam Linux identically to their native environment, enabling broad compatibility.

The main difference is Windows API calls route through Proton on their way to Linux graphics and system libraries. This translation layer enables AAA games deploying upwards of 150 GB to function flawlessly.

But where does Steam hide the Windows C drives housing these massive installs? Time to peek behind the curtain of prefixes…

Inside Steam Play Prefixes

Wine prefixes act as self-contained Windows environments tailored per game. This stops Windows system files from polluting your clean Linux drive.

All Steam Play prefixes live under:

/home/<user>/.steam/steam/steamapps/compatdata/<AppID>

As seen above, folders here match games‘ unique Steam AppID numbers. Let‘s dissect what happens inside:

1. New Prefix Created

When first installing a Windows game, Steam generates a blank Wine prefix. This initially contains:

  • pfx – Empty Windows C drive
  • dist – Proton build for that game

2. Windows Game Installs to Prefix

The game‘s Windows .exe installer runs inside this prefix, filling up the C drive. By default you get:

  • Program Files – Binaries, assets, configs
  • Users\steamuser\Documents – Save games, preferences

Mimics Windows game install procedure. Proton handles translation.

3. Prefix Confined to AppID Folder

This Wine prefix stays hidden within the game‘s compatdata subfolder. Other games can‘t access its contents or files. Isolation!

But you can directly inspect and edit prefixes. Here‘s how:

Accessing Windows Games on Linux via Prefixes

Thanks to prefix isolation, Windows games appear self-contained like native Linux titles once installed. The Steam client launches games via hidden Proton scripts, passing Vulkan graphics calls through the DirectX translation layers into the Windows environments.

As a user, you mostly just install and play Windows games on Linux identically to native ports.

But for modding or troubleshooting, access the prefixes:

  1. Right click game in your Steam library > Properties
  2. Click Local Files > Browse…
  3. Opens file manager to compatdata/<AppID> folder
  4. Navigate into pfx > drive_c
  5. Windows C drive contents exposed!

From here you can freely edit stuff like:

  • Executables in Program Files
  • Configs across various Windows folders
  • Save games under Users\steamuser\Documents
  • Mod data

If tweaking configs or adding mods:

  • Stick to Windows filesystem layout standards
  • Check PC guides if unsure where game expects files

This offers full control over Windows Steam games on Linux, despite them deploying inside Proton prefixes.

Quick Tip: symlinks can help games locate your saves, mods or configs if issues arise.

Now that you can freely delve into game installs, let‘s examine how Steam manages personal user data outside of prefixes…

How Steam Manages Personal User Data on Linux

In addition to various game installation folders, Steam needs to handle all the misc data created during play sessions:

  • Save games
  • Performance logs
  • Controller configs
  • Screenshots
  • Downloaded custom maps
  • Workshops item caches
  • Other per-user content

Rather than mix this data amid game files, Steam sensibly separates it out into dedicated user data directories, located at:

~/.local/share/Steam/userdata/

Unlike the game folders, userdata content indexes by Steam account first with numeric IDs, not AppID.

Under each account ID folder are subfolders tracking per-game data like saves, again matched to games‘ AppID.

So a full path to a save folder could look like:

/home/john/.local/share/Steam/userdata/12345678/35140/remote/save games

Breaking this down:

  • 12345678 – My account‘s numeric ID
  • 35140 – Terraria AppID
  • remote – Steam Cloud sub-folder
  • save games – Actual progress, worlds etc.

This approach keeps personal user data distinct from game installation files. It also enables Steam Cloud sync andsharing across platforms.

And remember – Linux native titles and Steam Play Windows games all funnel into the same core userdata folders!

The Steam client handles linking these save locations back into native game folders or Wine prefixes behind the scenes. But directly editing files under userdata bypasses any client-level issues.

Putting it All Together: A Steam Game File Blueprint

After digesting folders and prefixes and ID numbers, you might still feel disoriented peering down at Steam‘s Underworld sprawl of directories. So let‘s tie everything together into a unified blueprint.

If you want to locate the following for ANY Steam game on Linux:

  • Binaries: Check native common or Wine Program Files
  • Saves: Check native folders or userdata
  • Configs: Inside native installs or Wine Documents
  • Mods: Toss into native or Program Files
  1. Get the game‘s unique Steam AppID number
  2. See if Linux native build or check compatdata Proton prefix
  3. Access either native common folder or Wine drive_c
  4. Look under typical Windows or Linux paths for desired file types

Sure there might be exceptions. Some games split files oddly or rely on launch flags or symlinks. But 90% of the time, peeking into /steamapps/common/<AppID> or /compatdata/<AppID>/pfx/drive_c will expose everything you want to customize.

Et voila – I‘ve distilled Steam‘s Linux game directory sprawl into a basic 4 step file access master plan!

Advanced Customization: Proton Tricks

Thanks to Valve open sourcing Steam integration code with Proton upstream into Wine, Linux power users can deeply customize compatibility per-game.

While beyond the scope here, a few Proton pro tips:

Use Different Wine Versions Per Game

  1. Right click game > Properties > Compatibility
  2. Check "Force use of specific tool"
  3. Click "New tool" to select or make custom Wine builds!

Create Bottles Just For Mods

Similar to above, but creates clean prefixes. Great for testing game mods in isolation from your main save files.

Swap Vulkan Drivers

Graphics drivers like RADV or AMDVLK can be injected into Proton launch configs for specific titles. Helpful when troubleshooting performance issues.

Enable FSR/DXVK Upscaling

Using launch options, DXVK or AMD FidelityFX Super Resolution can force upscaled rendering to boost FPS with lightweight visual impact.

Proton offers near-endless customization for power users comfortable tweaking Wine builds. But even applying basic mods or accessing saves simply comes down to navigating the right Steam directories for each game.

Simplifying the Steam Library Labyrinth

While spelunking folders to move files around hardly makes for riveting Friday night gaming sessions, understanding Steam‘s Linux guts unlocks bonus perks like:

  • Fixing games that can‘t find your saves or configs
  • Adding visual mods and custom content
  • Troubleshooting performance issues
  • Testing different Proton builds
  • Organizing a unified launcher for Windows + Linux games

My goal was to both simplify the Linux gaming labyrinth, while proving how much control SteamOS really offers behind Big Picture Mode‘s controller-friendly UI.

So bookmark this page as your master explainer for where Valve hides your games. The directories covered here constitute a mere fraction of Linux‘s power. But they‘re the ones that hold your precious gaming progress.

Hopefully now when you pass the Controller to a friend and they inevitably save over your save in some 100+ hour RPG, you‘ll know where to dig for backups! Just don‘t forget the basics:

  1. Get the AppID
  2. Check native or Proton folders
  3. Access Windows or Linux equivalent paths
  4. Restore and carry on adventuring!

Game on!

Similar Posts