1.08M playing CS2 now · 24h peak 1.28M Nov 29, 2026 Independent fan site, not affiliated with Valve.Affiliate disclosure
CS2.us / Counter-Strike 2

How to Use an Autoexec File in CS2

Checked Nov 29, 2026 · valid for the Nov 26, 2026 update

Short answerAn autoexec.cfg file is a plain text file of console commands that CS2 can run when the game starts. Place it in the game's cfg folder, and check the current folder path in your Steam installation before you create it.
On this page
  1. What it does
  2. Where to put it
  3. Using it safely

An autoexec file saves you from retyping the same commands every time you launch the game. This page explains the basics, but always confirm the paths on your own installation.

What it does

  • It is a plain text file with one console command per line.
  • It is meant for settings you want applied every time you start the game.
  • Keep it simple, and add only commands you understand.

Where to put it

  1. Find the CS2 folder inside your Steam library.
  2. Open the game folder and look for the cfg folder.
  3. Check the current folder path on your install, since it can differ from older guides.

Using it safely

  • Back up any existing autoexec file before you edit it.
  • Use a plain text editor such as Notepad, not a word processor.
  • Remove a line if the game starts behaving unexpectedly.

Frequently asked questions

Does CS2 run autoexec.cfg automatically?

It is designed to run at startup when the file is in the correct folder. Check that your install uses the same path.

Can an autoexec file break my game?

A wrong command can change a setting in an unwanted way or fail to run. Removing the line usually fixes it.

Which editor should I use?

Any plain text editor works. Avoid rich text formats, which can add hidden formatting that the game cannot read.

CS2 betting

Bet on CS2 matches and tournaments. Get a +$250 welcome bonus.

Odds on any CS2 event, from the Majors to weekly leagues. Compare sportsbooks open in your state and claim the offer that fits how you bet.

21+. New customers only, offers vary by state, terms apply. Gambling problem? Call 1-800-GAMBLER.