CS Kaiyuan Game logo CS Kaiyuan GameCounter-Strike tips, strategies and gear for players who want to improve.
Guides

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.

A text editor showing a CS2 autoexec config file next to the game console confirming it loaded

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:

  1. Right click CS2 in Steam and open Properties.
  2. In the General tab, find Launch Options.
  3. 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:

BlockTypical commandsLines
Mousesensitivity, zoom_sensitivity_ratio2
Crosshaircl_crosshairstyle, cl_crosshairsize, cl_crosshairgap, cl_crosshaircolor6 to 10
Viewmodelviewmodel_fov, viewmodel_offset_x, viewmodel_offset_y, viewmodel_offset_z4
Bindsbind for grenades, voice, drop and inspect6 to 12
Audio and videovolume, fps_max2 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:

  1. After every major update, launch CS2 and check the console for red error lines that mention your commands.
  2. Remove or rename anything Valve has changed. Patch notes usually list renamed commands.
  3. Keep a dated copy of the file in a cloud folder or on a USB stick so a reinstall costs you nothing.
  4. 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.

KD
Kai Denton

Kai has played Counter-Strike competitively since the early CS:GO days and spent years breaking down how professional teams approach the game. He writes about tactics, economy and the decisions that separate average players from those who consistently rank up.

More posts by Kai

More in Guides

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto ankertoto