CS2 autoexec.cfg: file location, syntax, and starter binds
Where Counter-Strike 2 looks for autoexec.cfg, the exact launch option required to load it, supported syntax, and a starter file with practical binds.
autoexec.cfg is a plain text file CS2 reads at launch that runs console commands before you load into a match. It is the cleanest way to keep crosshair, viewmodel, network rate, and bind settings portable across PCs. CS2 still supports the file, but unlike CS:GO it does not load it automatically; you must add a launch option.
File location
| OS | Path |
|---|---|
| Windows | ...\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\autoexec.cfg |
| Linux | ~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg |
| macOS | ~/Library/Application Support/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg |
Required launch option
- In Steam, right click Counter-Strike 2 and choose Properties.
- Under General, set Launch Options.
- Add
+exec autoexec.cfg(and any other launch flags you use, separated by spaces).
-novid -tickrate 128 +exec autoexec.cfgSyntax
- One command per line. No semicolons required at end of line.
- Comments use
//. Anything after//on a line is ignored. - String values that contain spaces go in double quotes:
bind "kp_end" "buy ak47". echoprints to the developer console. Useful as a sanity check that the file loaded.
Starter autoexec.cfg
A practical baseline. Crosshair is left alone (use the in game editor and copy the resulting code into autoexec). Network rates target a stable 64 tick connection.
// Sanity checkecho "autoexec.cfg loaded"// Networkrate 786432cl_interp_ratio 1cl_interp 0cl_predict 1// Viewmodelviewmodel_offset_x 2viewmodel_offset_y 2viewmodel_offset_z -2viewmodel_fov 68// HUDcl_hud_color 2cl_radar_scale 0.4cl_radar_always_centered 0// Mousesensitivity 1.4zoom_sensitivity_ratio_mouse 1m_rawinput 1// Practical bindsbind "f" "+lookatweapon"bind "v" "+voicerecord"bind "mouse4" "+jump"bind "kp_end" "buy ak47; buy m4a1"bind "kp_downarrow" "buy awp"bind "kp_pgdn" "buy deagle"bind "kp_leftarrow" "buy vest"bind "kp_5" "buy vesthelm"bind "kp_rightarrow" "buy defuser"bind "kp_home" "buy flashbang"bind "kp_uparrow" "buy smokegrenade"bind "kp_pgup" "buy hegrenade"// Prevent CS2 from rewriting binds on quithost_writeconfig_ss 0Troubleshooting
File saved as autoexec.cfg.txt
Windows hides known extensions. Enable File Explorer Options → View → uncheck Hide extensions for known file types, then rename to drop the trailing .txt.
Binds reset after every session
CS2 writes config.cfg on clean shutdown. If you bind through the in game UI after autoexec runs, the UI value wins and gets saved. Set host_writeconfig_ss 0 at the end of autoexec.cfg to suppress the rewrite.
Launch option missing
Open the console (Shift + tilde with Developer Console enabled) and look for autoexec.cfg loaded. If you never see the line, the launch option is missing or the file is in the wrong folder.
Frequently asked questions
Does CS2 still use autoexec.cfg?
Yes. CS2 reads autoexec.cfg from the cfg folder of the active user, but only when you add +exec autoexec.cfg to your Steam launch options. Without the launch option, the file is ignored even if it exists.
Where is the CS2 autoexec.cfg file located?
Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg on Windows. The path on Linux is ~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg. The folder name is still csgo on disk even though the product is CS2.
Why are my autoexec binds not loading?
Three usual suspects: the +exec autoexec.cfg launch option is missing, the file has a .cfg.txt extension because Windows hides extensions by default, or a host_writeconfig issued in console overwrote the bindings. Add host_writeconfig_ss 0 at the bottom of autoexec.cfg to prevent CS2 from rewriting your binds on shutdown.
Can I use autoexec to bypass anti cheat?
No. autoexec.cfg only sets variables already exposed by the game. Anything that would alter rendering, hitboxes, or movement beyond what console commands allow is blocked by VAC and will get the account banned.