First-person view of an M4A1-S aimed down a sunlit canal on Anubis in Counter-Strike 2
Tutorial · Counter-Strike 2

CS2 Autoexec.cfg and Crosshair Codes: Complete Setup Guide

Set up a CS2 autoexec.cfg, enable the console, add +exec autoexec and import crosshair codes, using only commands verified in the current 2026 build.

Header image: An M4A1-S on Anubis in Counter-Strike 2. Your autoexec decides how that viewmodel, HUD and radar look every time you launch. Image: Valve.

A good CS2 autoexec does one job: it puts your HUD, radar, viewmodel and binds back exactly where you want them every time Counter-Strike 2 starts. Crosshair codes do the same for your reticle in seconds. The catch is that a lot of the configs still passed around were written for CS:GO, and several of those commands no longer exist.

Everything below was checked against the command and variable list shipped in the current Windows build, version 1.41.8.1 (build 2000908, dated September 9, 2026), plus Valve's own CS2 release notes. If a command isn't in that build, it isn't in this guide except in the "no longer works" table.

Setup at a glance

  1. 1Go to Settings > Game > Game and set Enable Developer Console to Yes.1 min
  2. 2In Settings > Game > Crosshair, click Share or Import, paste the CSGO- code and press Import.1 min
  3. 3Right-click Counter-Strike 2 in Steam, choose Manage > Browse local files, then open game > csgo > cfg.1 min
  4. 4Make a new text file named autoexec.cfg, with file extensions visible so it isn't saved as .cfg.txt.1 min
  5. 5Write one command per line, use // for comments and end with an echo line.5 min
  6. 6In Steam, open Properties > General and enter +exec autoexec under Launch Options.1 min
  7. 7Launch CS2, open the console and look for your echo line, then type a variable name to confirm its value.2 min

01Enable the Developer Console

The console is off by default. Open Settings > Game > Game and set Enable Developer Console to Yes. That menu option simply sets the con_enable variable to 1, and CS2 remembers it between sessions.

The default toggle key is the grave/tilde key (`), which runs toggleconsole. If your keyboard layout makes that key awkward, the same settings page has a shortcut to the console key binding under Keyboard / Mouse. The in-game tooltip also notes that launch options such as -console override the menu setting, so if the dropdown looks locked, check your launch options first.

Two console habits make the rest of this guide easier:

  • Type any variable name on its own (for example cl_crosshairsize) to print its current value.
  • Use find followed by part of a name (for example find radar) to list matching commands, or differences to list every variable you have changed from its default. That last one is the fastest way to copy your current setup into an autoexec.

02Import and Share Crosshair Codes

Crosshair share codes came over from CS:GO and look like CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx. The reliable way to use one in CS2 is the menu:

  1. Open Settings > Game and pick the Crosshair tab.
  2. Under the live preview, click Share or Import.
  3. Paste the code into the text box. The Import button only lights up once the game accepts the code as valid; otherwise you'll see "Invalid or old crosshair code".
  4. Click Import. The settings panel refreshes with the new values straight away.

To share your own crosshair, open the same popup and click Copy Your Code. The code goes to your clipboard and also appears in the text box. You may also see an Import from CS:GO button, which pulls the crosshair from the last time you played CS:GO.

What about apply_crosshair_code? A lot of guides tell you to type apply_crosshair_code CSGO-… into the console. The command is still in CS2's command table, but in build 1.41.8.1 it is flagged development-only, and Valve's March 30, 2023 notes say development console commands were disabled. Player reports on whether it runs from the normal console have been mixed since launch, so treat it as unconfirmed. If it returns "Unknown command" or does nothing, use the menu. If you want a crosshair baked into a config file, write the individual variables from the crosshair table further down instead.

An AK-47 firing toward B site on Inferno. Whether your crosshair follows recoil is set by cl_crosshair_recoil. Image: Valve.
An AK-47 firing toward B site on Inferno. Whether your crosshair follows recoil is set by cl_crosshair_recoil. Image: Valve.

03Find the CS2 cfg Folder

CS2 still lives in the old CS:GO install folder on Steam. The quickest route: in your Steam Library, right-click Counter-Strike 2, choose Manage > Browse local files, then open game > csgo > cfg.

Setupcfg folder path
Windows, default Steam libraryC:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg
Any other Steam library (Linux uses forward slashes)<your Steam library>/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg

You're in the right place if the folder already holds Valve's files such as gamemode_competitive.cfg and server.cfg. Don't edit those; Valve's updates can overwrite them. Your own file sits next to them.

04Write Your autoexec.cfg

Create a new text file in that folder and name it autoexec.cfg. On Windows, turn on View > File name extensions in File Explorer first, or you'll end up with autoexec.cfg.txt, which the game ignores. A config is plain text: one command per line, and anything after // is a comment (Valve's own shipped cfg files use the same style).

Here is a short starter file. Every line uses a variable or command present in the current build:

Line in autoexec.cfgWhat it does
// my CS2 autoexecComment, ignored by the game
cl_hud_telemetry_frametime_show 2Always show frame time and FPS in the HUD (0 never, 1 only if poor, 2 always)
cl_hud_telemetry_ping_show 2Always show ping
cl_hud_telemetry_net_misdelivery_show 1Show missed ticks only when the connection is poor
cl_radar_always_centered 0Use the full radar instead of keeping you in the middle
cl_radar_scale 0.4Zoom the radar out (valid range 0.25 to 1)
viewmodel_fov 68Widest allowed viewmodel field of view (range 60 to 68)
bind "MWHEELDOWN" "+jump"Jump on scroll down
bind "F3" "toggle cl_showfps"Toggle the simple FPS counter (note: F3 is autobuy by default)
echo "autoexec loaded"Prints a line in the console so you know the file ran

Keep the file lean. CS2 already saves any variable you set through the menus, so an autoexec is best for values the menus don't expose (viewmodel offsets, extra radar options, custom binds) and for things you want forced back after experimenting.

TipKeep crosshair variables out of your autoexec if you like trying new codes. The file runs on every launch and will overwrite whatever you imported through Share or Import.

05Add +exec autoexec to Launch Options

CS2's engine still contains the classic startup call to run autoexec.cfg, but the explicit launch option removes any doubt about whether and when it ran. In Steam, right-click Counter-Strike 2, choose Properties, stay on the General tab and type this into Launch Options:

+exec autoexec

The + prefix tells Valve's engines to run a console command at startup, as documented on the Valve Developer Community page for Source 2 command line options. The .cfg extension is optional; Valve's own shipped perftest.cfg tells you to run it as "exec_async perftest", with no extension. You can also run the file at any time by typing exec autoexec in the console, and execifexists runs a file only if it exists, which is handy for optional configs.

Leave CS:GO-era options such as -tickrate out. The Developer Community lists it as deprecated: CS2 runs 64-tick with sub-tick updates, so it does nothing.

Valve's "Moving Beyond Tick Rate" video (March 2023) explains the sub-tick system, which is why CS:GO networking commands like cl_updaterate have no place in a CS2 config.

06Verified CS2 Commands for Your Config

These tables list commands and variables confirmed in build 1.41.8.1, with the ranges the game itself reports. Anything marked as cheat-protected only works with sv_cheats 1 on a server you run.

Console and config utilities

CommandWhat it does
exec <file>Runs a cfg file from the cfg folder
execifexists <file>Runs a cfg file only if it exists
bind / unbind / unbindallBind a key, remove one bind, remove all binds (use unbindall with care)
aliasCreates a named shortcut for one or more commands
toggle <variable>Toggles a variable on and off
incrementvarSteps a variable's value up
key_listboundkeysLists every bound key
differencesShows every variable not at its default value
host_writeconfigSaves your user config values
echoPrints text to the console

HUD, performance and network

VariableValuesWhat it does
cl_hud_telemetry_frametime_show0 / 1 / 2Frame time and FPS readout: never, only if poor, always
cl_hud_telemetry_ping_show0 / 1 / 2Ping readout
cl_hud_telemetry_net_misdelivery_show0 / 1 / 2Missed ticks from loss or late delivery
cl_hud_telemetry_net_quality_graph_show0 / 1 / 2Jitter and packet loss graph
cl_showfps0 to 4Simple FPS meter at the top of the screen
fps_max0 = no limitIn-game frame rate cap (the Maximum FPS In Game slider)
fps_max_ui0 = no limitFrame rate cap in menus
cl_net_buffer_ticks0 to 2Extra buffering against packet loss and jitter, at the cost of effective ping
hud_scaling0.9 to 1.1HUD size
cl_hud_color0 = team color, 1 = white, and moreHUD color preset

Crosshair

VariableValuesWhat it does
cl_crosshairstyle2, 4 or 5 in the menu2 Classic, 4 Classic Static, 5 Legacy
cl_crosshairsize / cl_crosshairgap / cl_crosshairthicknessNumbersLine length, gap and thickness
cl_crosshairdot / cl_crosshair_t0 / 1Center dot; T-style (no top line)
cl_crosshair_drawoutline / cl_crosshair_outlinethickness0 / 1; 0 to 3Black outline and its thickness
cl_crosshaircolor_r / _g / _b0 to 255 eachCustom color; moving these sliders in the menu sets cl_crosshaircolor to 5
cl_crosshairalpha / cl_crosshairusealpha0 to 255; 0 / 1Transparency and whether it's applied
cl_crosshair_recoil0 / 1Crosshair follows recoil
cl_crosshairgap_useweaponvalue0 / 1Gap changes with the equipped weapon
cl_crosshair_sniper_width1 or moreSniper scope line width

Radar, viewmodel and audio

VariableValuesWhat it does
cl_radar_scale0.25 to 1Radar zoom
cl_hud_radar_scale0.8 to 1.3Radar size on screen
cl_radar_rotate / cl_radar_always_centered0 / 1Rotating radar; keep yourself centered
cl_radar_square_with_scoreboard0 / 1Square radar while the scoreboard is open
viewmodel_fov60 to 68Weapon model field of view
viewmodel_offset_x / _y / _zx -2 to 2.5; y and z -2 to 2Weapon model position
viewmodel_presetpos1 Desktop, 2 ClassicViewmodel preset
cl_prefer_lefthanded0 / 1Left-handed viewmodel preference
switchhands / switchhandsleft / switchhandsrightCommandsSwap hands, added as explicit commands in the May 23, 2024 update
volume / snd_voipvolume0 to 1; 0 to 2Master volume; voice chat volume
snd_menumusic_volume / snd_roundend_volume / snd_mvp_volume0 to 1Music volumes
snd_mute_losefocus0 / 1Mute when the game window loses focus

Practice-server commands (your own server only)

Put these in a separate practice.cfg and run it with exec practice after starting a private match, not in your autoexec: sv_cheats 1, sv_infinite_ammo 1 (cheat-protected), sv_grenade_trajectory_prac_pipreview 1, sv_rethrow_last_grenade (cheat-protected), mp_buy_anywhere 1, mp_startmoney 60000 with mp_maxmoney 60000, mp_freezetime 0, mp_roundtime_defuse 60, bot_kick, mp_warmup_end and mp_restartgame 1.

07CS:GO Commands That No Longer Work in CS2

If a copied config spits out "Unknown command" lines, one of these is usually why. None of the commands in the left column are in the current build's command list.

“Deleted cq_netgraph and cq_netgraph_problem_show_auto. Instead, use cl_hud_telemetry_serverrecvmargin_graph_show.”Valve, Counter-Strike 2 release notes for 2/15/2024
CS:GO commandStatus in CS2Use instead
net_graphNot in the gameThe telemetry variables above
cq_netgraphDeleted in the February 15, 2024 updatecl_hud_telemetry_serverrecvmargin_graph_show
cl_righthandNot in the gamecl_prefer_lefthanded, switchhands
cl_bob_lower_amt, cl_bobamt_lat, cl_bobamt_vertNot in the gameNo replacement
cl_cmdrate, cl_updaterateNot in the game; Valve removed legacy networking convars in 2023cl_net_buffer_ticks for buffering
m_rawinputNot in the gameNothing to set
mat_queue_mode, r_dynamic, cl_forcepreloadNot in the gameNo console equivalent
voice_scaleNot in the gamesnd_voipvolume
hideradar, drawradarPresent but development-onlyRadar variables above
Jump-throw aliasesIgnored by default since the August 19, 2024 updateBind jump and throw separately

That last row catches a lot of people. Valve's August 2024 notes say binds that combine more than one movement or shooting input (jump, attack, duck, forward and so on) are ignored by default, and re-enabling them needs the cheat-protected cl_allow_multi_input_binds. So an old jump-throw alias won't work in normal matchmaking.

The CS2 loadout screen. Your inventory lives on Valve's servers, but autoexec.cfg is a local file, so copy it to every PC you play on. Image: Valve.
The CS2 loadout screen. Your inventory lives on Valve's servers, but autoexec.cfg is a local file, so copy it to every PC you play on. Image: Valve.

08Troubleshooting Your Config

  • Nothing happens at launch: check the file is really named autoexec.cfg (not .cfg.txt), sits in game\csgo\cfg, and that the launch option reads +exec autoexec. Your echo line should appear in the console.
  • Your crosshair keeps reverting: your autoexec probably contains crosshair variables. It runs on every launch and overwrites whatever you imported through the menu.
  • A value won't change: check the range in the tables above. viewmodel_fov stops at 68, for example, and cl_radar_scale can't go below 0.25.
  • A command says it's cheat-protected: it only works with sv_cheats 1 on your own server, never in matchmaking.
  • A config worked last month and now errors: read the latest CS2 release notes. Valve adds and removes console variables in regular updates.

For the full background on the game itself, see the official Counter-Strike site and the Counter-Strike 2 Wikipedia article. The Developer Community also keeps an older list of CS2 console commands and variables (retrieved in October 2023) and a general autoexec explainer.

FAQ

Where is the autoexec.cfg folder in CS2?

Put autoexec.cfg in Counter-Strike Global Offensive\game\csgo\cfg inside your Steam library. On a default Windows install that is C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg. The quickest way there is Manage > Browse local files in Steam.

Does CS2 run autoexec.cfg automatically?

The engine still contains the classic startup call for autoexec.cfg. Adding +exec autoexec to your Steam launch options makes the game run the file explicitly on every launch, so you don't have to rely on the default behavior. An echo line at the end confirms it ran.

Does apply_crosshair_code work in CS2?

It's unconfirmed. The command still exists in the current build but is flagged development-only, and player reports are mixed. The reliable method is Settings > Game > Crosshair > Share or Import.

Why don't my jump-throw binds work in CS2?

Since the August 19, 2024 update, binds that combine more than one movement or shooting input are ignored by default. Re-enabling them needs cl_allow_multi_input_binds, which is cheat-protected, so bind jump and throw separately.

What replaced net_graph in CS2?

CS2 has no net_graph. Use the Telemetry options in the game settings, or set cl_hud_telemetry_frametime_show, cl_hud_telemetry_ping_show and cl_hud_telemetry_net_misdelivery_show to 2 to always show FPS, ping and missed ticks.

Official resources

Ana Ruiz
Written byAna Ruiz

Ana writes the step-by-step tutorials: settings, controls, configs and the systems games never explain properly. Every tutorial is tested on the version named at the top of the page, with the official patch notes linked so you can check what changed.

More Counter-Strike 2