CS2 autoexec config: how to set up a custom config file that loads every launch
Posted: Sat Oct 17, 2026 10:36 pm
CS2 autoexec config: how to set up a custom config file that loads every launch
If you are tired of reapplying the same settings every time CS2 starts, an autoexec.cfg file is the fix. This guide walks through creating one, loading it on launch, and using aliases and binds to speed up your workflow.
What an autoexec does
An autoexec.cfg is a plain text file in your CS2 cfg folder that the game executes on startup. It can set cvars, bind keys, and run aliases. Once it loads, you do not need to touch the console unless you want to change something on the fly.
Where to put it
Place the file at:
If the file already exists, edit it. If it does not, create a new text document and rename it to autoexec.cfg. Make sure Windows is showing file extensions so you do not end up with autoexec.cfg.txt.
Loading it on launch
Right click Counter-Strike 2 in your Steam Library, go to Properties, and in the Launch Options field add:
Every time the game starts, it will run the commands in your autoexec after the default config loads. You can also type in the console to apply changes without restarting.
Basic structure
A minimal autoexec looks like this:
Aliases and binds
An alias lets you group commands under one name. A bind maps an alias or command to a key. Here is a simple jumpthrow alias:
This presses jump and releases attack on the same tick, which is how jumpthrows work. You can find many community configs on GitHub that use this pattern for practice mode toggles, grenade deletes, and bot spawn keys.
Common pitfalls
- If your settings reset after closing the game, make sure is the last line in your autoexec. This writes your current values to config.cfg so they persist.
- If the game ignores your autoexec, check that Launch Options contains with no extra spaces or quotes.
- Some cvars are protected or reset by Valve updates. If a command stops working, check the official CS2 console command list.
Source
[1] Steam Community guide: How to Create an autoexec.cfg File for CS2
[2] Community autoexec.cfg template on GitHub
[3] Alternative config template with crosshair aliases
If you are tired of reapplying the same settings every time CS2 starts, an autoexec.cfg file is the fix. This guide walks through creating one, loading it on launch, and using aliases and binds to speed up your workflow.
What an autoexec does
An autoexec.cfg is a plain text file in your CS2 cfg folder that the game executes on startup. It can set cvars, bind keys, and run aliases. Once it loads, you do not need to touch the console unless you want to change something on the fly.
Where to put it
Place the file at:
Code: Select all
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\autoexec.cfg
Loading it on launch
Right click Counter-Strike 2 in your Steam Library, go to Properties, and in the Launch Options field add:
Code: Select all
+exec autoexec
Code: Select all
exec autoexecBasic structure
A minimal autoexec looks like this:
Code: Select all
// Network
rate "786432"
cl_interp "0"
cl_interp_ratio "1"
// FPS
fps_max "400"
fps_max_ui "60"
// Radar
cl_radar_scale "0.4"
cl_radar_icon_scale_min "0.4"
// Crosshair (example: small green dot)
cl_crosshaircolor 5
cl_crosshaircolor_r 0
cl_crosshaircolor_g 255
cl_crosshaircolor_b 0
cl_crosshairsize 1
cl_crosshairthickness 0
cl_crosshairdot 1
cl_crosshairgap -4
// Viewmodel
viewmodel_fov "68"
viewmodel_offset_x "2.5"
viewmodel_offset_y "0"
viewmodel_offset_z "-1.5"
An alias lets you group commands under one name. A bind maps an alias or command to a key. Here is a simple jumpthrow alias:
Code: Select all
alias "+jumpthrow" "+jump;-attack"
alias "-jumpthrow" "-jump"
bind "v" "+jumpthrow"
Common pitfalls
- If your settings reset after closing the game, make sure
Code: Select all
host_writeconfig- If the game ignores your autoexec, check that Launch Options contains
Code: Select all
+exec autoexec- Some cvars are protected or reset by Valve updates. If a command stops working, check the official CS2 console command list.
Source
[1] Steam Community guide: How to Create an autoexec.cfg File for CS2
[2] Community autoexec.cfg template on GitHub
[3] Alternative config template with crosshair aliases