CS2 Autoexec Setup Guide for a Config That Survives Updates
You spend forty minutes dialing in a crosshair, a viewmodel and six binds. Two weeks later a Steam cloud sync or a reinstall wipes the lot, and you are back to the default green cross and a buy menu you cannot find.

You spend forty minutes dialing in a crosshair, a viewmodel and six binds. Two weeks later a Steam cloud sync or a reinstall wipes the lot, and you are back to the default green cross and a buy menu you cannot find. A CS2 autoexec file is the fix: one plain text file that reapplies every setting you care about each time the game starts.
I have rebuilt my config from memory more times than I want to admit, so this guide is the version I wish I had the first time. It covers where the file goes, how to make CS2 actually run it, what belongs inside, and which popular lines you should leave out.
What a CS2 Autoexec Does and Why the Menus Are Not Enough
The settings menu writes your choices to a config that CS2 manages itself. That file gets overwritten by updates, cloud sync conflicts and the occasional crash on exit. An autoexec is different because you own it. The game reads it, applies each command in order, and never writes back to it.
That gives you three practical wins:
- Portability. Copy one file to a new PC or a LAN machine and your setup is back in seconds.
- Precision. Some values, like exact viewmodel offsets or crosshair gaps, are easier to type than to drag on a slider.
- A record. When your aim feels off after a patch, you can compare what you run now against what you ran last month.
Where the File Goes
CS2 does not look in the old CS:GO folder. The correct path on a default Steam install is:
Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg
The fastest way to get there is to right click CS2 in your Steam library, choose Manage, then Browse local files, and open game, csgo and cfg in turn. Inside that folder, create a new text file and name it autoexec.cfg.
The extension trap
Windows hides known file extensions by default, so a lot of players end up with autoexec.cfg.txt and wonder why nothing loads. In File Explorer, open the View menu and turn on file name extensions before you rename anything. If the file icon still looks like a notepad page after renaming, the .txt is probably still there.
Making CS2 Actually Run It
In CS:GO, a file called autoexec.cfg ran on its own. In CS2 that behaviour has been unreliable since launch, so do not trust it. Add a launch option instead:
- Right click CS2 in Steam and open Properties.
- In the General tab, find Launch Options.
- Type +exec autoexec and close the window.
Then put this as the very first line of the file: echo "autoexec loaded". Start the game, open the console with the tilde key, and scroll to the top. If you see that message, the file ran. If you do not, the problem is the path or the name, not your commands. This one line saves more troubleshooting time than anything else in the guide.
You can also run the file by hand at any point by typing exec autoexec in the console. I do this after every edit.
What Belongs in a Good Autoexec
Keep the file organised in blocks with a short label above each one, written as a line starting with two slashes. CS2 ignores those lines, and future you will thank present you. Here is the structure I use and roughly how many lines each block takes:
| Block | Typical commands | Lines |
|---|---|---|
| Mouse | sensitivity, zoom_sensitivity_ratio | 2 |
| Crosshair | cl_crosshairstyle, cl_crosshairsize, cl_crosshairgap, cl_crosshaircolor | 6 to 10 |
| Viewmodel | viewmodel_fov, viewmodel_offset_x, viewmodel_offset_y, viewmodel_offset_z | 4 |
| Binds | bind for grenades, voice, drop and inspect | 6 to 12 |
| Audio and video | volume, fps_max | 2 to 4 |
For the crosshair block, copy your values straight from the console after you have tuned them in game, rather than guessing. If you have not settled on a crosshair yet, read what crosshair settings pros actually use and start from one of those before you write it down.
Binds that earn their place
Grenade binds are the biggest quality of life gain. Something like bind "f" "use weapon_flashbang" and bind "z" "use weapon_smokegrenade" means you stop scrolling through your inventory mid round. Add a clear bind for voice and one to drop a weapon for a teammate, and you have covered most of what matters.
The Lines You Should Leave Out
Here is where I disagree with a lot of config videos. They tell you to grab a pro player's full config and drop it in. Do not. A pro config is tuned to that player's monitor, mouse, resolution and habits, and half of it exists for reasons that do not apply to you.
Three categories cause most of the trouble:
- Old CS:GO network commands. Lines like cl_interp tweaks or cl_cmdrate were meaningful in the old game. In CS2 many of them are locked, renamed or do nothing, and they just fill the console with errors.
- Multi action scripts. Valve has moved against aliases that chain several movement or attack actions from one key, and official servers can kick you for them. The classic jump throw alias is no longer needed for consistent throws anyway.
- Settings you never tested. If you cannot explain why a line is there, delete it. A short file you understand beats a 200 line file you copied.
The same thinking applies to audio. Copying someone else's volume and spatial settings rarely matches your headset. Our breakdown of CS2 audio settings for competitive play explains which choices are personal and which are not.
Testing and Maintaining Your Config
After the first version works, treat it like any other piece of practice. My routine takes about five minutes a month:
- After every major update, launch CS2 and check the console for red error lines that mention your commands.
- Remove or rename anything Valve has changed. Patch notes usually list renamed commands.
- Keep a dated copy of the file in a cloud folder or on a USB stick so a reinstall costs you nothing.
- Change one block at a time. If you adjust sensitivity and viewmodel on the same night, you will not know which one made you feel better.
One more habit: some players add host_writeconfig as the last line so the game saves the applied values. That is fine, but your autoexec should stay the master copy. If the two ever disagree, the autoexec wins on the next launch.
FAQ
Why is my CS2 autoexec not loading?
Nine times out of ten the file is in the wrong cfg folder or is secretly named autoexec.cfg.txt. Check the path ends in game\csgo\cfg, turn on file extensions, and confirm the +exec autoexec launch option is set. The echo line at the top tells you instantly whether it ran.
Can an autoexec get me banned?
Normal settings, binds and crosshair values are completely safe. The risk comes from scripts that automate several actions at once, which Valve treats as unfair on official servers. Stick to one action per key and you have nothing to worry about.
Should I use the same autoexec for practice servers?
Keep a separate file, such as practice.cfg, for things like infinite ammo or grenade trajectories, and run it with exec practice only when you are on your own server. Mixing practice commands into your main file causes errors in matchmaking.
Build It Once, Then Leave It Alone
Make the file tonight: create autoexec.cfg in the right folder, add the echo line, set the launch option, and move over your mouse, crosshair, viewmodel and grenade binds. Back it up somewhere outside the game folder. Then stop tweaking for at least two weeks and let your muscle memory settle. If you want more setup walkthroughs like this one, browse the rest of our CS2 guides.
More in Guides
Guides
How to Set Up CS2 on a Laptop Without Overheating
The pattern shows up in almost every laptop clip people send me.
Guides
How to Counter Strafe in CS2 and Stop Missing Shots
You peek, your crosshair is right on his head, you click, and the bullet lands a meter to the left.
Guides
How to Read the CS2 Radar Without Losing Your Crosshair
You die to a player your teammate spotted four seconds ago, and the red dot was sitting right there in the corner of your...