exec

General

Runs a config file. Runs every command written in a .cfg file from the game's cfg folder, for example a practice config or your autoexec.

exec autoexec

Syntax

exec <filename>

Examples

exec autoexec
exec practice

How to use exec in CS2

  1. Enable the developer console in Settings › Game › Enable Developer Console.
  2. Press ~ to open the console, type the command and press Enter.
  3. To apply it every time you launch CS2, add the line to an autoexec.cfg file in your cfg folder.

Related commands

Learn more

exec FAQ

What does exec do in CS2?

Runs a config file. Runs every command written in a .cfg file from the game's cfg folder, for example a practice config or your autoexec.

Does exec need sv_cheats?

No. exec works without sv_cheats, including in official matchmaking.

All CS2 console commands ›