Trap #1: The CS2 Directory Changed From CS:GO
Valve kept the outer Steam folder named Counter-Strike Global Offensive so players would not lose library links during the CS2 upgrade — which tricks thousands of people into pasting configs into the old CS:GO subfolder. Source 2 reads exclusively from the nested game\csgo\cfg\ directory:
D:\SteamLibrary\), use Steam → Manage → Browse local files to jump straight to the right root.Step-by-Step Setup (Zero Mistakes)
- Open Steam, right-click Counter-Strike 2 → Manage → Browse local files.
- Double-click into
game→csgo→cfg. (You should see Valve's built-in files likegamemode_competitive.cfginside — if you do not, you are in the wrong folder.) - Critical Windows Step: In File Explorer, open View → Show → File name extensions (Windows 11) or check File name extensions on the View ribbon (Windows 10). Without this checked, renaming a Notepad file to
autoexec.cfgsilently createsautoexec.cfg.txt, which CS2 will never read! - Create a plain text file named
autoexec.cfg(or click Download .cfg in our Autoexec Builder and drop it directly into this folder). - Always place these two lines at the very bottom of the file so CS2 saves your settings and prints a bright confirmation message in console:
Mandatory Footer for Verification
// Bottom of autoexec.cfg host_writeconfig echo "========================================" echo ">>> CSGOCodex autoexec.cfg LOADED OK <<<" echo "========================================" - In Steam, right-click Counter-Strike 2 → Properties → General → Launch Options and add:
Force CS2 to Load autoexec.cfg Every Boot
+exec autoexec
Complete Troubleshooting Matrix (Every Error & Exact Fix)
| Symptom / Console Output | Root Cause | Exact Fix |
|---|---|---|
exec: couldn't exec 'autoexec.cfg' |
File is named autoexec.cfg.txt or saved in old csgo\cfg\. |
Turn on Windows file extensions, remove trailing .txt, and confirm path includes \game\csgo\cfg\. |
exec autoexec works manually, but never runs on startup |
Missing +exec autoexec in Steam Launch Options, or file saved with UTF-8 BOM header. |
Add +exec autoexec to Launch Options; open file in Notepad++ / VS Code and save as plain UTF-8 (no BOM). |
| Crosshair or sensitivity reverts after restart | Steam Cloud / read-only cs2_ conflict, or missing host_. |
Remove Read-Only flag on userdata .vcfg files and ensure host_ sits at the very end of autoexec.cfg. |
Console prints 15+ Unknown command errors |
Copied a legacy CS:GO config containing removed cvars (net_, cl_, r_). |
Audit and strip dead cvars using our CS:GO → CS2 Replaced Commands Matrix. |
Organizing Multiple Config Files Like a Pro
Once your game\csgo\cfg\ folder is working, keep your setup modular instead of jamming offline cheat commands into your main autoexec:
autoexec.cfg— Competitive match baseline (runs automatically via+exec autoexec).prac.cfg— Offline utility & smoke lab (grab our completeprac.cfg; run manually viaexec prac).demo.cfg— Fast replay scrubbing binds (grabdemo.cfg; run viaexec demo).
Whenever you finish a practice or demo session, simply type exec autoexec in console before queuing Premier to restore every competitive keybind cleanly.
Frequently Asked Questions
Where is the CS2 cfg folder on Linux / SteamOS (Steam Deck)?
On Linux, the default path is ~/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/. Note that Linux filenames are case-sensitive — always use lowercase autoexec.cfg.
Should I set autoexec.cfg to Read-Only in Windows Properties?
There is no need — CS2 never writes back into autoexec.cfg. Leaving it writable makes editing convenient. Only make sure your userdata .vcfg files are not Read-Only so host_writeconfig works cleanly.
Why do comments start with // in CS2 cfg files?
Source 2 ignores anything after // on a line, letting you organize your autoexec into labeled sections (Crosshair, Radar, Binds, Telemetry) without affecting execution.
How do I back up my existing CS2 settings before installing a new autoexec?
Copy your entire Steam\userdata\<SteamID3>\730\local\cfg\ folder to your Desktop or cloud drive before making changes.