Home » Articles » Guides » How to Set Up a CS2 Config File for Counter-Strike 2 Commands

How to Set Up a CS2 Config File for Counter-Strike 2 Commands

This guide tells you how to set up a CS2 config file for saving and executing developer console commands in Counter-Strike 2. Do you want to set up a file that applies all your favorite CS2 command settings? If so, check out the guidelines for creating a Counter-Strike config file in the article below.

How to Set Up a CS2 Config File for Counter-Strike 2 Commands

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?

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.

  1. First, open a File Explorer window by clicking the taskbar shortcut with the folder library icon.
  2. 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.
  3. Next, open the Steam installation folder.
  4. Navigate to the steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg subfolder within the Steam directory.
  5. Right-click a space within the cfg subfolder and select New > Text Document.

  6. Enter autoexec to be the new file for the name and press Enter.
  7. Next, right-click the autoexec.txt file to select Rename.
  8. Change the TXT extension at the end of the file to CFG and press Enter.
    An autoexec.cfg file in the CFG folder

    An autoexec.cfg file in the CFG folder

  9. 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.

  1. Right-click the autoexec.cfg file you’ve created and click Open with > Notepad.
  2. Input the console commands into separate lines within the file. Each command should be on a separate line like in the snapshot below.
    Console commands in an autoexec.cfg file

    Console commands in an autoexec.cfg file

  3. Click File to view the options on that Notepad menu.
  4. 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 in Counter-Strike 2

The developer console in Counter-Strike 2

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.

  1. Open Steam and its Library tab.
  2. Right-click Counter-Strike 2 in Steam’s left sidebar to select Properties.
  3. Input +exec autoexec.cfg into the Launch Options.
    The Launch Options box

    The Launch Options box

  4. 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.

Leave a Reply