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