Counter-Strike 2

Counter-Strike 2

Not enough ratings
How to Create an autoexec.cfg File for CS2
By adg
In Counter-Strike 2, an “autoexec” file loads all its settings and commands every time the game starts. This guide will show you how to create an autoexec.cfg file for your own game using a template or manually.
   
Award
Favorite
Favorited
Unfavorite
Why use an autoexec file?
Using an autoexec file ensures that your settings do not get reset, as the game loads all of the commands every time the file is executed.

This also allows you to easily transfer settings between different computers, or quickly set up your game settings again after an OS reinstall.

By utilizing aliases, you can also do things like bind keys to different crosshairs, etc.
Using the Template
• You can either create the file manually or download a base template file from here: https://github.com/ADG248/cs2cfg/blob/main/autoexec.cfg

**⚠️Be aware that some values are already set for viewmodel, radar, audio, telemetry, and more. If you don’t want your settings to change, remove these first.**

The template includes preset commands to fill out, as well as "Practice Mode" On/Off Keybinds, Spawn CT/T Bot Keybinds, Delete Grenade Keybind (Delete Smokes, etc.), and more.

Click the Download button at the top right.

Place the autoexec.cfg file in \Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg in File Explorer

You can get there by right clicking Counter-Strike 2 in your Steam Library, go to Manage>Browse Game Files. In the File Explorer window, navigate through the folders: game>csgo>cfg, and place the autoexec.cfg file in the "cfg" folder.

Open the autoexec.cfg file using a text editor, Notepad, Notepad++, etc.

Edit the autoexec.cfg file to your settings, just fill out the values of the commands to your preferences and save. You can leave some of the commands blank.

To find the value for a command that the game is already using, enter the command into the CS2 console without a value, and it will show you the value the game is using.

In your Steam Library, right click Counter-Strike 2 and open Properties. Inside of the Launch Options box, add “+exec autoexec”

Now every time the game starts, it will load all of the commands inside of the .cfg file.
Manually Creating the File
• To manually create an autoexec.cfg file, go to \Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg in File Explorer.

You can get there by right clicking Counter-Strike 2 in your Steam Library, go to Manage>Browse Game Files. In the File Explorer window, navigate through the folders: game>csgo>cfg. The autoexec.cfg file will go in the "cfg" folder.

In File Explorer, click “View” and make sure Show File Extensions is checked. For Windows 11, it is under "View" then "Show".

Create a New Text Document, and name it "autoexec.cfg" or whatever you want ending in “.cfg”

Add all of the commands you want the game to load in the file.

In your Steam Library, right click Counter-Strike 2 and open Properties. Inside of the Launch Options box, add “+exec autoexec”, or the name of the .cfg file being used.

Now every time the game starts, it will load all of the commands inside of the .cfg file.
Extra Information / Checklist
https://developer.valvesoftware.com/wiki/Autoexec

Make sure the file ends in the .cfg file extension.
In File Explorer you may need to click “View” and make sure Show File Extensions is checked. For Windows 11, it is under "View" then "Show".

Place the autoexec.cfg file in \Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg

In Counter-Strike 2's Launch Options make sure to add "+exec autoexec"

Now the game should load that file and execute all of its commands every time the game launches.

To find the value for a command that the game is already using, enter the command into the CS2 console without a value, and it will show you the value the game is using.

By using aliases, you can run a sequence of commands in a single custom command. "A shortcut to one or more commands."
• alias alias_name "command1; command2; ..."
• bind KEY alias_name

If you make changes to the file while in-game, you don't have to restart the game, just type "exec autoexec" in the CS2 console to reload the settings. You can also bind a key, "bind KEY exec autoexec"

You can change the name of "autoexec" as long as the file ends in .cfg.
If you change the name "autoexec" you will need to use that name instead in the Launch Options, etc.

You can right click the file and create a shortcut that you can put anywhere you like. You could also pin the "cfg" folder that the file is in to Quick Access in File Explorer.

I recommend putting the autoexec.cfg file in cloud storage, such as Google Drive, Settings.gg, etc. for a backup.
This also makes it easy to transfer your game settings to another PC or if you reset your PC.
Example
Here is a completed example of the template: https://settings.gg/adg_/cs2
Click the blue “Config” button to download it.
Thanks for reading!
3 Comments
Apr 16 @ 7:07am 
nice thanks
Nov 11, 2025 @ 5:51am 
not rly needed in cs2
Jul 28, 2025 @ 10:39am 
da