Lineups.gg logo lineups.gg

CS2 Autoexec: How to Create and Configure Your autoexec.cfg

Complete CS2 autoexec guide with a ready-to-use config. Crosshair, viewmodel, network, jump throw bind, practice mode, and every command explained.

- 13 min read
autoexecconfigconsole-commandssettingsbeginner

What Is an Autoexec in CS2?

An autoexec.cfg is a configuration file that CS2 reads and executes automatically every time the game launches. Instead of typing console commands manually each session, you write them once in this file and they apply every time.

Think of it as your personal settings blueprint. Crosshair preferences, keybinds, network optimizations, viewmodel adjustments, and practice commands all go here. If you have ever lost your jump throw bind after a game update or had to re-enter your crosshair settings, an autoexec solves that permanently.

Every serious CS2 player uses one. Pro players carry their autoexec from tournament to tournament to ensure their settings are identical on every machine. Even if you are just starting out, setting one up now saves you hours of frustration down the road.

How to Create Your CS2 Autoexec

Step 1: Find Your CS2 Config Folder

Your autoexec file needs to go in the CS2 config directory. The default path is:

C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg

If you installed Steam on a different drive, adjust the path accordingly. On macOS, the path is:

~/Library/Application Support/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg

On Linux:

~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg

Step 2: Create the File

  1. Open the cfg folder
  2. Right-click and create a new text file
  3. Name it exactly autoexec.cfg (not autoexec.cfg.txt - make sure file extensions are visible in your file explorer)
  4. Open it with any text editor (Notepad, VS Code, Sublime Text, or Notepad++)

Step 3: Add the Steam Launch Option

For CS2 to read your autoexec on startup, you need to add a launch option:

  1. Open Steam and go to your Library
  2. Right-click Counter-Strike 2 and select Properties
  3. In the General tab, find Launch Options
  4. Add: +exec autoexec.cfg

That is it. Every time CS2 launches, it reads your autoexec and applies all your settings.

Complete Ready-to-Use Autoexec

Copy everything below into your autoexec.cfg file. Each section is commented so you know what every command does. Adjust the values to your preferences.

// ============================================
// CS2 AUTOEXEC.CFG - lineups.gg
// ============================================
// Place this file in:
// .../Counter-Strike Global Offensive/game/csgo/cfg/
// Add "+exec autoexec.cfg" to your Steam launch options.

// ============================================
// CROSSHAIR SETTINGS
// ============================================
cl_crosshairstyle 4           // Static classic crosshair
cl_crosshairsize 2            // Length of crosshair lines
cl_crosshairgap -1            // Gap between crosshair lines (negative = tighter)
cl_crosshairthickness 1       // Thickness of crosshair lines
cl_crosshairdot 0             // Center dot (0 = off, 1 = on)
cl_crosshaircolor 1           // Crosshair color (1 = green)
cl_crosshair_drawoutline 1    // Outline around crosshair for visibility
cl_crosshair_outlinethickness 0.5
cl_crosshairalpha 255         // Crosshair opacity (0-255)
cl_crosshairusealpha 1        // Use custom alpha value
cl_crosshair_sniper_width 1   // Sniper scope crosshair width

// ============================================
// VIEWMODEL SETTINGS
// ============================================
viewmodel_fov 68              // Viewmodel field of view (54-68)
viewmodel_offset_x 2.5        // Horizontal offset
viewmodel_offset_y 0          // Depth offset
viewmodel_offset_z -1.5       // Vertical offset
viewmodel_presetpos 0         // 0 = use custom offsets above
cl_bob_lower_amt 5            // Weapon bob when running
cl_bobamt_lat 0.1             // Lateral weapon bob
cl_bobamt_vert 0.1            // Vertical weapon bob

// ============================================
// MOUSE / SENSITIVITY
// ============================================
sensitivity 1.0               // In-game sensitivity (adjust to your preference)
zoom_sensitivity_ratio 1.0    // Scoped sensitivity multiplier
m_rawinput 1                  // Raw mouse input (bypass OS acceleration)

// ============================================
// NETWORK / RATE SETTINGS
// ============================================
rate 786432                   // Max data rate (786432 for broadband connections)
cl_interp_ratio 1             // Interpolation ratio
cl_interp 0                   // Let the engine calculate based on ratio
cl_updaterate 128             // Tick rate for updates
cl_cmdrate 128                // Command rate sent to server

// ============================================
// HUD SETTINGS
// ============================================
cl_showfps 0                  // FPS counter (0 = off, 1 = on)
cl_hud_color 7                // HUD color (7 = green)
hud_scaling 0.85              // HUD scale
cl_hud_radar_scale 1.15       // Radar size
cl_radar_scale 0.4            // Radar zoom level
cl_radar_always_centered 0    // Show full map on radar when possible

// ============================================
// AUDIO SETTINGS
// ============================================
volume 0.3                    // Master volume
snd_voipvolume 0.5            // Voice chat volume
snd_musicvolume 0             // Music volume (off for competitive focus)
snd_headphone_pan_exponent 1.2
snd_headphone_pan_radial_weight 0.5

// ============================================
// JUMP THROW BIND
// ============================================
// Essential for consistent smoke lineups.
// Releases the grenade at the exact peak of your jump.
alias "+jumpthrow" "+jump; -attack"
alias "-jumpthrow" "-jump"
bind "v" "+jumpthrow"

// ============================================
// GRENADE BINDS
// ============================================
// Quick-switch to specific grenades without using the scroll wheel.
bind "z" "slot6"              // HE Grenade
bind "x" "slot7"              // Flashbang
bind "c" "slot8"              // Smoke Grenade
bind "4" "slot9"              // Decoy
bind "5" "slot10"             // Molotov / Incendiary

// ============================================
// PRACTICE MODE TOGGLE
// ============================================
// Type "practice" in console to enable practice settings.
// Type "endpractice" to reset.
alias "practice" "sv_cheats 1; mp_warmup_end; mp_freezetime 0; mp_roundtime_defuse 60; sv_infinite_ammo 1; sv_grenade_trajectory 1; sv_grenade_trajectory_time 10; sv_showimpacts 1; noclip; echo Practice mode ON"
alias "endpractice" "sv_cheats 0; sv_infinite_ammo 0; sv_grenade_trajectory 0; sv_showimpacts 0; echo Practice mode OFF"

// ============================================
// MISC
// ============================================
con_enable 1                  // Enable developer console
cl_join_advertise 2           // Let friends join your game
fps_max 0                     // Uncapped FPS (set to your monitor's refresh rate if preferred)
r_drawtracers_firstperson 1   // Show bullet tracers in first person
cl_autohelp 0                 // Disable in-game help popups
gameinstructor_enable 0       // Disable game instructor messages
cl_disablefreezecam 1         // Disable freeze cam on death

// Apply and confirm
echo "autoexec.cfg loaded successfully"
host_writeconfig

Every Command Explained

Crosshair Settings

Your crosshair is the most personal setting in CS2. These commands give you full control:

  • cl_crosshairstyle 4 sets a static classic crosshair. Style 4 does not expand when you move or shoot, giving you a fixed reference point. Most competitive players use style 4 or 5. For a deep dive into every crosshair option, check out our CS2 crosshair settings guide.
  • cl_crosshairsize controls how long the crosshair lines extend. Values between 1.5 and 3.5 are typical. Smaller crosshairs offer precision at range. Larger ones are easier to see during fast fights.
  • cl_crosshairgap adjusts the space between the center and the crosshair lines. Negative values pull the lines closer together. A gap of -1 or -2 keeps things tight without obscuring your target.
  • cl_crosshairthickness sets the line width. Thinner lines (0.5-1) show more of the target. Thicker lines (1.5-2) are easier to track during movement.
  • cl_crosshairdot adds or removes the center dot. Some players prefer a dot-only crosshair for precise aiming. Most leave it off to avoid clutter.
  • cl_crosshaircolor uses preset colors (1 = green, 2 = yellow, 3 = blue, 4 = cyan, 5 = custom). Green and cyan are the most popular because they stand out against most map textures.
  • cl_crosshair_drawoutline adds a dark border around the crosshair lines, improving visibility against bright backgrounds.

Viewmodel Settings

These commands control how your weapon appears on screen:

  • viewmodel_fov 68 is the maximum field of view for your weapon model. A higher FOV pulls the gun closer to the edge of the screen, giving you more visible play area. Most pros use 60-68.
  • viewmodel_offset_x/y/z fine-tune the exact weapon position. Positive X moves the gun right, positive Z moves it up. Adjust these until the weapon model feels natural without blocking your view.
  • cl_bobamt commands control weapon bobbing while running. Lower values (0.1) minimize the visual noise from movement.

Mouse and Sensitivity

  • sensitivity is your base in-game sensitivity. Multiply this by your mouse DPI to get your eDPI (effective DPI). Most pros play between 600-1000 eDPI. For example, 800 DPI with 1.0 sensitivity equals 800 eDPI.
  • zoom_sensitivity_ratio scales your sensitivity when scoped. 1.0 means it matches your hip-fire feel proportionally. AWPers sometimes lower this to 0.8-0.9 for steadier scoped aim.
  • m_rawinput 1 sends mouse movement directly to the game, bypassing Windows pointer acceleration. Always keep this on.

Network Settings

  • rate 786432 is the maximum bytes per second the client will receive from the server. On a modern broadband connection, set this to the max. If you have a slow connection, lower it.
  • cl_interp_ratio and cl_interp control interpolation (smoothing between server updates). Setting interp to 0 and ratio to 1 lets the engine optimize based on your connection. On stable connections, this gives the best hit registration.
  • cl_updaterate and cl_cmdrate at 128 match the tick rate of competitive servers. These values ensure your client communicates with the server as often as possible.

Jump Throw Bind

The jump throw bind is arguably the most important bind for utility lineups. It combines jumping and releasing the grenade into a single key press, ensuring the smoke releases at the exact peak of your jump every single time. Without it, you rely on manual timing, which introduces inconsistency.

We use v by default, but you can bind it to any key. This bind is essential for almost every lineup on the site. See our smoke practice guide for how to drill lineups with this bind.

Practice Mode

The practice alias combines all the console commands you need for an offline practice session into a single command. Type practice in console and you immediately get infinite ammo, visible grenade trajectories, extended round time, and noclip for flying around the map.

This is the fastest way to load into a map and start drilling Mirage smokes, Dust2 smokes, or any other lineup. Type endpractice to reset everything back to normal.

For a full breakdown of practice mode and all the individual commands, read our How to Practice Smokes in CS2 guide.

Grenade Binds

Binding each grenade type to a dedicated key lets you switch to the exact grenade you need without fumbling through the scroll wheel. In a fast-paced execute, the difference between pressing c for a smoke and scrolling to find it can mean the difference between a successful site take and a failed push.

The slot numbers map to:

  • slot6 = HE Grenade
  • slot7 = Flashbang
  • slot8 = Smoke Grenade
  • slot9 = Decoy
  • slot10 = Molotov / Incendiary

Pick keys that are easy to reach without lifting your hand from WASD. The z, x, c row is popular because it sits right below your movement keys.

CS2 vs CSGO: What Changed

If you are migrating from CSGO, be aware of several important changes:

Commands That No Longer Work in CS2

  • cl_crosshairstyle 1, 2, 3 - CS2 only supports styles 0, 4, and 5. The dynamic styles from CSGO are gone.
  • cl_righthand - Removed. Viewmodel side is now controlled in the in-game settings menu.
  • net_graph 1 - The classic net graph is removed. CS2 has a new performance overlay accessible through settings.
  • cl_bob_lower_amt, cl_bobamt_lat, cl_bobamt_vert - These may behave differently or be restricted compared to CSGO. Test your values in-game.
  • cl_disablehtmlmotd - Removed in CS2.

Commands That Changed

  • Rate values have increased. In CSGO, the max rate was 786432 and that remains the recommended value in CS2, but the sub-tick system means interpolation behaves differently.
  • cl_interp settings are less impactful due to CS2’s sub-tick architecture. The engine handles more of the interpolation automatically. Setting it to 0 and letting the engine decide is now the standard recommendation.
  • sv_grenade_trajectory visuals have been updated. In CS2, trajectory lines are rendered in the game world rather than as an overlay, making them easier to follow during practice.

New CS2 Commands Worth Knowing

  • cl_crosshaircolor_r/g/b - Custom RGB crosshair colors (set cl_crosshaircolor 5 first)
  • cl_crosshair_t 1 - T-shaped crosshair (removes top line)
  • sv_rethrow_last_grenade - Rethrows the last grenade you threw. Incredibly useful for practice. Throw a smoke, fly to where it lands with noclip, check if it is correct, then rethrow without walking back.

Troubleshooting

Autoexec Not Loading

If your settings are not applying on launch:

  1. Check the file name - It must be autoexec.cfg, not autoexec.cfg.txt. Enable “Show file extensions” in your file explorer to verify.
  2. Check the file location - It must be in the cfg folder inside game/csgo/cfg, not the old CSGO config path.
  3. Check the launch option - Make sure +exec autoexec.cfg is in your Steam launch options, not +exec autoexec (include the .cfg extension).
  4. Check for syntax errors - A typo or missing quote can cause the file to stop executing at that line. Every command should be on its own line.

Settings Resetting Between Sessions

If some settings revert after restarting CS2:

  • Make sure host_writeconfig is the last line in your autoexec. This writes your current settings to the game’s own config file, creating a backup.
  • Some settings (like crosshair) can be overridden by the in-game settings menu. If you change your crosshair in the menu after your autoexec loads, the menu settings will take priority next launch. Stick to editing the autoexec for consistency.

Console Not Opening

If pressing the tilde key (~) does not open the console:

  1. Go to Settings > Game > Enable Developer Console and set it to Yes
  2. Or ensure con_enable 1 is in your autoexec and loading properly

Next Steps

Your autoexec is set up and ready. Here is what to do next:

  • Learn your first lineups - Start with Mirage smokes or Dust2 smokes. These are the most popular maps and the lineups you will use most often.
  • Practice offline - Use the practice mode alias from your autoexec. Our smoke practice guide walks through the full workflow.
  • Customize further - The autoexec above is a solid starting point. Adjust sensitivity, crosshair size, and keybinds to match your preferences. The best config is the one that feels right to you.

FAQ

Where does the autoexec.cfg file go in CS2?

The autoexec.cfg file goes in your CS2 config folder. On Windows the path is C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg. On macOS it is ~/Library/Application Support/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg, and on Linux it is ~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg. Make sure the file is named exactly autoexec.cfg (not autoexec.cfg.txt) and that you have added +exec autoexec.cfg to your Steam launch options.

Does the autoexec update automatically when Valve patches CS2?

No. Your autoexec.cfg is a file you create and maintain yourself, so Valve updates do not modify it. However, a CS2 update can occasionally change how certain commands work or remove commands entirely. If something stops working after a patch, check the CS2 patch notes to see if any commands were deprecated or changed. Your custom settings in the autoexec will continue to load on every launch unless a command is no longer recognized by the game.

Can you have multiple autoexec files for different purposes?

Yes. You can create separate config files like practice.cfg, competitive.cfg, or warmup.cfg in the same cfg folder and load them manually by typing exec practice or exec competitive in the console. Only the file named autoexec.cfg runs automatically on launch. A common approach is to keep your core settings (crosshair, sensitivity, keybinds) in the autoexec and use separate config files for situational setups like practice mode or different crosshair presets.

Can autoexec commands get you banned in CS2?

No. Every command you can put in an autoexec.cfg is a standard CS2 console command that Valve provides. Console commands cannot trigger a VAC ban. Commands that require sv_cheats 1 (like noclip or infinite ammo) only work on private servers and are automatically disabled on VAC-secured matchmaking servers. You are safe to experiment with any console command in your autoexec without risking your account.

Want to level up your game?

Join our community for exclusive strats, VOD reviews, and practice sessions with other competitive players.

Join Community