An autoexec.cfg file is used in CS:GO to ensure some commands / settings are always set. The autoexec.cfg file is automatically executed on startup like the config.cfg file, and can contain pretty much any client-side command in Counter Strike: Global Offensive.
In this guide we’ll run through how you create one and give you some tips on what to include.
Step 1: Finding the config (cfg) folder
First off, you’ll need to locate your config folder. This is a detailed Reddit thread on how to do so, but in short you can find CS:GOs config folder under the path: “…\Steam\userdata\<YOURID>\730\local\cfg”.
Where “<YOURID>” is the ID of your Steam account (for example “91325575”).
Step 2: Create the autoexec.cfg file
Once you’re in the cfg folder, you should create a new file named “autoexec.cfg”. You need to use that exact name, otherwise it won’t work.
On Windows, do this by right clicking in the folder, go to “New” and then click “Text document”. Name the text document “autoexec.cfg”.
Step 3: Edit and configure your autoexec.cfg file
Now you can enter any commands you want into the autoexec file. Do this by editing the file in a text editor. Again, on Windows you could do this by right clicking the file and selecting “Open with” and then “Notepad”.
Example autoexec.cfg file
(text following “//” (comments) is ignored in the autoexec. The following text can be copied straight into your autoexec.cfg.)
If for some reason the autoexec.cfg file isn’t executed on startup
There’s a few ways to solve this issue, listed below:
a) Manually execute the autoexec.cfg by entering the command “exec autoexec” in your in-game console.
b) Add all the commands from your autoexec.cfg to your config.cfg instead.
c) Add the command “exec autoexec” at the end of your config.cfg.
d) Add “+exec autoexec” to the launch options of Counter Strike: Global Offensive. For example, with the console activated your launch options would be: “-console +exec autoexec”.
List of commands/cvars you can add to your autoexec.cfg
You can use our list of all CS:GO console commands to find commands that you can add to your autoexec.cfg.