A CS2 config file stores personalized settings for the Counter-Strike 2 game. You can create a custom config file that executes CS2 console commands for configuring the game included within it. These are settings you would otherwise need to manually execute within the developer console every time you play Counter-Strike 2. That developer console doesn’t save executed commands when you restart CS2. However, creating a CS2 config file enables you to save the console settings applied within Counter-Strike 2.
Looking for more Counter-Strike 2 guides from KeenGamer?
- How to Change Your CS2 Viewmodel in Counter-Strike 2
- How to Watch CS2 Replays of Your Counter-Strike 2 Matches
- How to Get a Grip of Gun Recoil in Counter-Strike 2
- How to do CS2 Aim Training in Counter-Strike 2
- How to Customize the CS2 Crosshair in Counter-Strike 2
Add a New CS2 Config File to the CFG Folder
The CFG folder includes the config files for Counter-Strike 2. There, you can create a new CS2 config file that executes all developer console commands it includes when running. This is how you can add a new CS2 config file to the CFG folder.
- First, open a File Explorer window by clicking the taskbar shortcut with the folder library icon.
- To enable visible file extensions in Windows 11, click the View command bar button and select Show > File name extensions. In Windows 10, click File name extensions on the View tab if that option isn’t selected.
- Next, open the Steam installation folder.
- Navigate to the steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg subfolder within the Steam directory.
- Right-click a space within the cfg subfolder and select New > Text Document.
- Enter autoexec to be the new file for the name and press Enter.
- Next, right-click the autoexec.txt file to select Rename.
- Change the TXT extension at the end of the file to CFG and press Enter.
- Click Yes when asked to confirm the file extension change.
How to Edit Your New CS2 Config File
Now you will have an autoexec.cfg that’s ready to edit. You can add any number of CS2 developer console commands to that file. These are the steps for editing a custom CS2 config file.
- Right-click the autoexec.cfg file you’ve created and click Open with > Notepad.
- Input the console commands into separate lines within the file. Each command should be on a separate line like in the snapshot below.
- Click File to view the options on that Notepad menu.
- Select the Save option for the edited file from there.
If you don’t know what commands to include within your autoexec.cfg file, check out our guide to utilizing Counter-Strike 2’s developer console. That post includes numerous commands you can include within an autoexec.cfg file. Or check out this Valve Developer Community page, which has a long list of commands for configuring Counter-Strike 2 with the console.
The developer console enables you to configure viewmodel, crosshair, game performance, key binds, practice bots, and much more. So, you can create an autoexec file that applies many configuration settings for Counter-Strike 2. For example, a config file that executes the enable frame rate counter and crosshair dot commands looks like this:
cl_crosshairdot 1
cl_showfps 1
Add the CS2 Config File to Steam’s Launch Options
You can manually run an autoexec.cfg file by executing an exec autoexec command with Counter-Strike 2’s developer console. However, it’s better to set that file to automatically run when the game starts. You can do so by adding an exec command to Counter-Strike 2’s launch options in Steam like this.
- Open Steam and its Library tab.
- Right-click Counter-Strike 2 in Steam’s left sidebar to select Properties.
- Input +exec autoexec.cfg into the Launch Options.
- Start your Counter-Strike 2 game. The autoexec.cfg will automatically execute all its CS2 console commands when the game starts.
Creating a CF2 config file will ensure that your preferred console command settings always remain with you. Such a file is invaluable for applying and saving personalized configurations for Counter-Strike 2.