What an autoexec file does and why you need one

An autoexec file is a text document that runs your personal settings automatically every time you launch Counter-Strike 2. Instead of adjusting your mouse sensitivity, crosshair, volume, or keybinds through the game menu each session, the autoexec loads them when ready when the game starts. This saves time and ensures your setup stays consistent.

The file is named autoexec.cfg and lives in your game folder. Counter-Strike 2 reads it on startup and applies every command inside. You write the commands yourself — there is no menu interface for this step. The file is plain text, which means you create it in Notepad or any basic text editor.

Most players use an autoexec to lock in crosshair settings, adjust mouse acceleration, set volume levels, bind keys to specific actions, and configure video preferences. Without it, you would manually change these settings every time you play, or they would reset to defaults.

Key Takeaways

  • An autoexec.cfg file is a text document you create in Notepad that tells Counter-Strike 2 which settings to load automatically when the game starts.
  • The file must be saved in your Counter-Strike 2 config folder, which is usually located at Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg on Windows.
  • Each line in the file is a single command, written exactly as it appears in the game console, with no special formatting or symbols.
  • You must launch the game with the -autoexec launch option in Steam, or the file will not run automatically.
  • Common commands include sensitivity (mouse speed), crosshair settings, volume, and key bindings for grenades or utility.

Finding your Counter-Strike 2 config folder

Before you create the autoexec file, you need to know where to save it. Counter-Strike 2 stores configuration files in a specific folder inside your Steam installation. On Windows, the path is usually C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg. On Mac, it is in your user Library under Steam.

The easiest way to find this folder is to open Steam, right-click Counter-Strike 2 in your library, select Properties, then click "Browse local files." This opens the game folder directly. From there, navigate to game > csgo > cfg. This cfg folder is where your autoexec.cfg file will live.

If the cfg folder does not exist, you can create it yourself. Right-click in the csgo folder, select New > Folder, and name it cfg. Counter-Strike 2 will recognize it when you save your autoexec file there.

Creating the autoexec.cfg file in Notepad

Open Notepad (search for it in your Windows Start menu or Applications on Mac). Do not use Word or any rich-text editor — Notepad is plain text only, which is what Counter-Strike 2 requires. Type or paste your commands into the blank document, one command per line.

A basic autoexec might look like this:

sensitivity 1.8 m_accel 0 volume 0.5 cl_crosshairsize 2 cl_crosshairthickness 0.5 bind "e" "use weapon_knife" bind "f" "noclip"

Each line is a single setting. The first word is the command name, and the value after it is what you want it set to. Strings (text values) go in quotes, numbers do not. You can find a full list of Counter-Strike 2 console commands online, but start with the settings you change most often — sensitivity, crosshair, and keybinds.

Once you have typed or pasted all your commands, go to File > Save As. Name the file autoexec.cfg exactly — no spaces, no .txt extension. Set the file type to "All Files" so Notepad does not add .txt to the end. Save it directly into the cfg folder you found earlier.

Launching Counter-Strike 2 with the autoexec option

Creating the file is only half the work. Counter-Strike 2 will not run it automatically unless you tell Steam to pass a specific launch command. Open Steam, right-click Counter-Strike 2 in your library, and select Properties. Look for the Launch Options field (usually near the bottom of the General tab).

In the Launch Options box, type -autoexec and click OK. This tells Steam to run your autoexec.cfg file when the game starts. Some players also add other launch options here, like -novid (skip the intro video) or -high (run the game with high priority), but -autoexec is the essential one.

Close the Properties window and launch the game normally. When Counter-Strike 2 starts, it will read your autoexec.cfg and explore all the commands inside. You can verify this worked by opening the console (press the backtick key, usually to the left of the 1 key) and typing status — if your settings match what you wrote in the file, the autoexec ran successfully.

Common commands to include in your autoexec

Your autoexec can contain dozens of commands, but most players start with a few core ones. Sensitivity controls mouse speed — typical values range from 0.8 to 3.0 depending on your mouse and preference. m_accel turns mouse acceleration on or off (0 is off, 1 is on). Most competitive players set it to 0.

Crosshair commands let you customize the aiming reticle. cl_crosshairsize sets the size, cl_crosshairthickness controls the line width, and cl_crosshaircolor picks a color (0 is red, 1 is green, 2 is yellow, 3 is blue, 4 is cyan). You can also set cl_crosshairgap to adjust the gap in the middle.

Bind commands assign actions to keys. The format is bind "key" "action". For example, bind "e" "use weapon_knife" makes the E key pull out your knife, and bind "v" "noclip" makes V toggle no-clip mode (useful in practice). You can bind almost any key to almost any action.

Volume is set with the volume command, where 0 is silent and 1 is full volume. You can also use snd_musicvolume to control music separately. Rate and cl_cmdrate control your network settings — these matter less for casual play but are important if you are playing competitively.

Troubleshooting when your autoexec does not run

If you launch the game and your settings do not appear, the autoexec file did not run. The most common cause is a missing -autoexec launch option in Steam. Check your Launch Options field again — it must say -autoexec with no typos. If it is there, close Steam completely and reopen it.

The second most common issue is the file name or location. Make sure the file is named autoexec.cfg with no extra extensions like .txt. If you saved it as autoexec.cfg.txt, rename it by right-clicking, selecting Rename, and removing the .txt part. Verify the file is in the cfg folder, not in csgo or game.

If the file is in the right place with the right name and the launch option is set, open the console in-game and type exec autoexec.cfg manually. If that works, the file is valid but Steam is not running it automatically — try restarting Steam. If the console shows an error, there is a typo or syntax error in one of your commands. Check each line for spelling and quotes.

Editing your autoexec after you create it

You do not need to recreate the file every time you want to change a setting. Right-click autoexec.cfg in your cfg folder, select Open With, and choose Notepad. Make your changes, save the file, and restart Counter-Strike 2. The new settings will load on startup.

Many players keep their autoexec open in Notepad while they play, test a setting in the console, and then add it to the file if they like it. This is a fast way to experiment without committing to a change. Once you find settings you like, save them to the autoexec so they persist across sessions.

If you ever want to disable the autoexec temporarily, remove -autoexec from your Launch Options in Steam. The file will stay in your cfg folder, but it will not run. You can re-enable it by adding the launch option back.

Frequently Asked Questions

What if I do not know what commands to put in my autoexec?

Start with the settings you change most often in the game menu — usually sensitivity, crosshair, and volume. Open the console in-game (backtick key), type each setting you want to change, and write down the command and value. Then add those lines to your autoexec. You can expand it later as you learn more commands.

Can I copy someone else's autoexec file?

Yes, but their settings may not work for you. Sensitivity, crosshair size, and keybinds are personal — what feels right for them might feel wrong for you. Use someone else's autoexec as a starting point, then edit it to match your preferences. The structure and syntax are the same for everyone.

Will using an autoexec get me banned?

No. An autoexec file only changes your personal settings — it does not modify game files, inject code, or give you an unfair advantage. Valve allows autoexec files and many professional players use them. The only restriction is that you cannot use commands that are disabled on competitive servers.

What happens if I make a typo in my autoexec?

Counter-Strike 2 will skip the line with the typo and continue loading the rest of the file. Open the console and check for error messages, then fix the misspelled command in Notepad and save. Restart the game to reload the corrected file.

Can I have multiple autoexec files for different game modes?

Not with the standard autoexec system — only one autoexec.cfg runs at startup. However, you can create separate config files with different names (like competitive.cfg or practice.cfg) and manually load them in the console with exec competitive.cfg. Some players add a bind to their autoexec that switches between configs when ready.