How to Use Autoexec in CS2

A complete guide to setting up and using an autoexec.cfg file in Counter-Strike 2. An autoexec file lets you save your preferred settings so they load automatically every time you start the game.

What is Autoexec.cfg?

The autoexec.cfg file is a plain text configuration file that CS2 reads when it starts up. Every line in the file is treated as a console command and executed automatically. This means any setting you put in your autoexec will be applied every time you launch the game, without needing to manually type commands each session.

This is especially useful for settings that reset between sessions, custom key binds, network optimization, and audio preferences that you want to keep consistent.

Step 1: Find the Config Folder

Navigate to your CS2 configuration folder. The default path depends on your operating system and Steam installation location. The typical path is:

C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg\

On macOS, look in ~/Library/Application Support/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/. On Linux, check ~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/.

Step 2: Create the File

Create a new text file in the cfg folder and name it exactly autoexec.cfg. Make sure your operating system is not hiding file extensions - the file must end in .cfg, not .cfg.txt. You can use any text editor like Notepad, VS Code, or Sublime Text.

Step 3: Add Your Commands

Add one console command per line. Lines starting with // are comments and will be ignored. Here is a basic example structure:

// My CS2 Autoexec Config // Network rate 786432 cl_interp_ratio 1 // Audio volume 0.5 snd_mixahead 0.025 // Binds bind "mwheeldown" "+jump" // Confirmation echo "Autoexec loaded successfully"

The echo line at the end prints a message in the console to confirm your autoexec loaded properly.

Step 4: Ensure It Loads

CS2 should load autoexec.cfg automatically. If it does not, add the following to your Steam launch options:

+exec autoexec.cfg

You can also type exec autoexec in the CS2 console at any time to manually reload the file.

Common Commands for Autoexec

Here are the most popular commands organized by category. Use our Autoexec Generator to build a complete file with all the settings you need.

Network Optimization

CommandDescription
rate 786432Maximum network bandwidth
cl_interp_ratio 1Minimum interpolation for less delay
cl_interp 0Let engine calculate interpolation

Performance

CommandDescription
fps_max 0Remove FPS cap
r_dynamic 0Disable dynamic lighting
cl_showfps 1Display FPS counter

Useful Binds

CommandDescription
bind "mwheeldown" "+jump"Mouse wheel jump for bunny hopping
bind "n" "noclip"Toggle noclip for practice

Troubleshooting

If your autoexec is not loading, check these common issues: the file may be named autoexec.cfg.txt instead of autoexec.cfg, the file may be in the wrong directory, or your commands may have syntax errors. Open the CS2 console and look for error messages after startup.

If changes do not seem to apply, try adding host_writeconfig at the end of your autoexec to force CS2 to save the settings.

Autoexec FAQ

Does CS2 automatically load autoexec.cfg?
CS2 should load autoexec.cfg automatically if placed in the correct folder. If it does not, add +exec autoexec.cfg to your Steam launch options.
Can I have multiple autoexec files?
You can create multiple .cfg files and execute them manually with the exec command. Only autoexec.cfg runs automatically on startup.
Will autoexec.cfg get me banned?
No, autoexec.cfg only contains standard console commands that are available to all players. It is an officially supported feature.
How do I reset my autoexec?
Delete or rename your autoexec.cfg file and restart CS2. The game will use default settings for any commands that were in the file.