How to Use an Autoexec File in CS2
Checked Nov 29, 2026 · valid for the Nov 26, 2026 update
On this page
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
- Find the CS2 folder inside your Steam library.
- Open the game folder and look for the cfg folder.
- 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.