CS2 控制台命令

完整参考:250 条 CS2 控制台命令和变量,涵盖 16 个类别。即时搜索、筛选并复制任意命令。

显示 250 / 250 条命令

如何打开控制台

1
打开设置

点击 CS2 主菜单左上角的齿轮图标。

2
启用控制台

前往游戏选项卡 → 找到启用开发者控制台 (~) → 设为.

3
按下波浪键 (~)

在游戏中,按~键(Tab 上方)打开控制台。输入任意命令并按 Enter。

Essential Commands

Must-know commands every CS2 player should have in their toolkit.

15
命令说明默认值
quitImmediately closes CS2
disconnectDisconnects from the current server
retryReconnects to the last server
execExecutes a config file (e.g. exec autoexec)
host_writeconfigSaves current settings to config.cfg
bindBinds a key to a command (e.g. bind "f" "+use")
unbindRemoves a key binding
unbindallRemoves all key bindings — use with caution
aliasCreates a shortcut name for a sequence of commands
echoPrints text to the console (useful in configs for labels)
clearClears the console output
statusShows server info, connected players, and your SteamID
pingShows your current ping to the server
versionShows the current CS2 build version
mapsLists all available maps on the server

Crosshair

Customize every aspect of your crosshair appearance.

18
命令说明默认值
cl_crosshairstyleCrosshair style (0 = default, 1 = static classic, 2 = dynamic classic, 3 = dynamic, 4 = static, 5 = legacy)0
cl_crosshairsizeLength of the crosshair lines2.5
cl_crosshairgapGap between crosshair lines and center (-5 to 5)0
cl_crosshairthicknessThickness of the crosshair lines0.5
cl_crosshaircolorCrosshair color preset (1=green, 2=yellow, 3=blue, 4=cyan, 5=custom RGB)1
cl_crosshaircolor_rCustom crosshair red value (0-255)50
cl_crosshaircolor_gCustom crosshair green value (0-255)250
cl_crosshaircolor_bCustom crosshair blue value (0-255)50
cl_crosshairalphaCrosshair opacity (0-255, 255 = fully opaque)200
cl_crosshairdotShow center dot (0 = off, 1 = on)0
cl_crosshair_tT-shaped crosshair — removes top line (0 = off, 1 = on)0
cl_crosshair_drawoutlineDraw outline around crosshair (0 = off, 1 = on)0
cl_crosshair_outlinethicknessThickness of the crosshair outline1
cl_crosshair_sniper_widthWidth of the sniper scope crosshair line1
cl_crosshair_sniper_show_normal_inaccuracyShow movement inaccuracy on sniper crosshair0
cl_crosshairgap_useweaponvalueUse weapon-specific gap values for dynamic crosshair0
cl_crosshair_friendly_warningCrosshair warning when aiming at teammates (0=off, 1=flash, 2=icon)1
cl_crosshair_recoilCrosshair follows recoil pattern (0=off, 1=on)1
👁️

Viewmodel & HUD

Adjust your weapon viewmodel position and HUD display settings.

24
命令说明默认值
viewmodel_fovViewmodel field of view (54-68)60
viewmodel_offset_xViewmodel horizontal offset (-2.5 to 2.5)2.5
viewmodel_offset_yViewmodel depth offset (-2 to 2)0
viewmodel_offset_zViewmodel vertical offset (-2 to 2)-1.5
viewmodel_presetposViewmodel preset (1=desktop, 2=couch, 3=classic)1
cl_righthandRight-hand (1) or left-hand (0) weapon model1
cl_bobamt_latWeapon bob amount — lateral movement0.4
cl_bobamt_vertWeapon bob amount — vertical movement0.25
cl_bob_lower_amtHow much the viewmodel lowers when running21
cl_bobcycleBob cycle speed0.98
cl_showfpsShow FPS counter (0=off, 1=FPS, 2=FPS+frametime)0
cl_showposShow position, velocity, and angles on screen0
cq_netgraphShow network graph with ping, loss, and tick info0
cl_drawhudSVToggle the entire HUD on or off1
cl_draw_only_deathnoticesSVOnly show kill feed — hide rest of HUD0
hud_scalingHUD scale size (0.5-0.95)0.85
cl_hud_colorHUD accent color (0-10: default, white, blue, purple, green, etc.)0
cl_hud_background_alphaHUD background transparency (0.0-1.0)0.5
cl_hud_healthammo_styleHealth/ammo HUD style (0=default, 1=simple)0
cl_hud_playercount_showcountShow player count as number (1) or avatars (0)0
cl_hud_playercount_posPlayer count position (0=top, 1=bottom)0
cl_showloadoutAlways show weapon loadout panel (0=auto-hide, 1=always)1
safezonexHorizontal HUD safe zone (0.85-1.0)1.0
safezoneyVertical HUD safe zone (0.85-1.0)1.0
🖱️

Mouse & Sensitivity

Fine-tune mouse input, sensitivity, and acceleration.

7
命令说明默认值
sensitivityMouse sensitivity value (typically 0.5-4.0)2.5
zoom_sensitivity_ratioScoped sensitivity multiplier (relative to hip-fire)1.0
m_rawinputUse raw mouse input, bypassing OS acceleration (0=off, 1=on)1
m_yawMouse yaw (horizontal) sensitivity factor0.022
m_pitchMouse pitch (vertical) sensitivity factor0.022
m_customaccelCustom mouse acceleration mode (0=off, 1=on)0
m_customaccel_exponentMouse acceleration exponent (if enabled)1.05
🏃

Movement

Commands related to player movement, jumping, and crouching.

16
命令说明默认值
+forwardMove forward (default: W)
+backMove backward (default: S)
+moveleftStrafe left (default: A)
+moverightStrafe right (default: D)
+jumpJump (default: Space)
+duckCrouch/duck (default: Ctrl)
+sprintWalk/shift-walk for silent movement (default: Shift)
cl_forcepreloadPreload all map resources at load time0
sv_autobunnyhoppingSVAuto-bunny hop when holding jump (hold space)0
sv_enablebunnyhoppingSVRemove bunny hop speed cap0
sv_maxspeedSVMaximum player movement speed320
sv_stamina_maxSVMaximum stamina penalty (affects jump height)80
sv_stamina_recovery_rateSVRate at which stamina recovers60
sv_staminajumpcostSVStamina cost per jump0.08
sv_wateraccelerateSVWater acceleration speed10
cl_showposDisplay position and velocity overlay (useful for movement practice)0
📡

Radar & Minimap

Customize the radar display, zoom, rotation, and icons.

6
命令说明默认值
cl_radar_scaleRadar zoom level (0.25-1.0, lower = more zoomed out)0.7
cl_radar_always_centeredKeep player centered on radar (0=off gives wider view)1
cl_radar_rotateRadar rotates with player view (0=fixed north, 1=rotate)1
cl_radar_icon_scale_minMinimum icon size on radar0.6
cl_hud_radar_scaleRadar HUD element size1.0
cl_radar_square_with_scoreboardShow square radar when scoreboard is open1
🌐

Network & Connection

Optimize your network settings for lower latency and smoother gameplay.

11
命令说明默认值
rateMax bytes per second from server (786432 = max for 128-tick)786432
cl_interp_ratioInterpolation ratio (1 = LAN/good connection, 2 = default)2
cl_interpInterpolation amount in seconds (0 = auto-calculate from ratio)0.03125
cl_cmdrateMax command packets sent to server per second128
cl_updaterateMax update packets received from server per second128
mm_dedicated_search_maxpingMaximum acceptable ping for matchmaking servers150
cl_timeoutSeconds before disconnecting from an unresponsive server30
net_graphShow network statistics overlay (0=off, 1=on)0
net_graphproportionalfontScale net_graph text proportionally1
cl_predictEnable client-side prediction (should always be 1)1
cl_lagcompensationEnable lag compensation1
🔊

Audio & Sound

Adjust volume levels, 3D audio, and audio output settings.

18
命令说明默认值
volumeMaster volume (0.0-1.0)1.0
snd_roundstart_volumeRound start music volume (0.0-1.0)0.04
snd_roundend_volumeRound end music volume (0.0-1.0)0.04
snd_deathcamera_volumeDeath camera music volume0.0
snd_mvp_volumeMVP anthem volume0.03
snd_tensecondwarning_volumeTen-second bomb warning volume0.05
snd_menumusic_volumeMain menu music volume0.03
snd_mapobjective_volumeMap objective sound volume (bomb plant/defuse)0.04
snd_headphone_pan_exponentHeadphone panning curve exponent1.0
snd_headphone_pan_radial_weightHeadphone spatial weight for radial panning1.0
snd_front_headphone_positionFront speaker position for headphone virtualization90.0
snd_rear_headphone_positionRear speaker position for headphone virtualization90.0
snd_mute_losefocusMute audio when CS2 is not the active window1
voice_scaleTeammate voice chat volume scale1.0
voice_enableEnable voice communication (0=off, 1=on)1
voice_modenableEnable open mic mode1
cl_mute_enemy_teamMute enemy team voice and text chat0
cl_mute_all_but_friends_and_partyOnly hear friends and party members0
🖥️

Graphics & Performance

Optimize visual settings and FPS performance.

11
命令说明默认值
fps_maxMaximum framerate cap (0 = unlimited)400
fps_max_uiMaximum framerate in menus/UI120
r_dynamicEnable dynamic lighting (0=off for FPS boost)1
r_drawtracers_firstpersonShow bullet tracers in first person (0=off)1
r_drawparticlesSVDraw particle effects1
mat_queue_modeMaterial threading mode (-1=auto, 0=sync, 2=multi-core)-1
cl_forcepreloadForce preload all assets at map load0
mat_disable_bloomDisable bloom/glow effects0
engine_low_latency_sleep_after_client_tickReduce input latency by sleeping after client ticktrue
cl_animate_player_modelsAnimate player models in menus1
r_fullscreen_gammaFullscreen gamma value2.2
🔫

Weapon & Shooting

Weapon behavior, buy commands, and shooting-related settings.

17
命令说明默认值
cl_autowepswitchAuto-switch to picked up weapons (0=off, 1=on)1
cl_use_opens_buy_menuUse key opens buy menu in buy zone (0=off)1
closeonbuyClose buy menu after purchasing (0=stay open)0
cl_autohelpShow automatic help/hint messages1
cl_showhelpShow on-screen help tips1
buyBuy a weapon (e.g. buy ak47, buy vesthelm)
slot1Switch to primary weapon
slot2Switch to secondary weapon (pistol)
slot3Switch to knife
slot4Switch to grenades
slot5Switch to C4 / defuse kit
lastinvSwitch to last used weapon (quick-switch)
invnextCycle to next weapon in inventory
invprevCycle to previous weapon in inventory
+reloadReload current weapon
dropDrop the currently held weapon
cl_crosshair_recoilCrosshair follows recoil (0=static, 1=follows spray)1
🎯

Practice & Training

Commands for private practice servers — most require sv_cheats 1.

31
命令说明默认值
sv_cheatsEnable cheat-protected commands (0=off, 1=on)0
noclipSVToggle fly mode — pass through walls and terrain
godSVToggle invincibility (god mode)
sv_infinite_ammoSVInfinite ammo (1=infinite reserve, 2=no reload needed)0
sv_grenade_trajectorySVShow grenade flight path lines0
sv_grenade_trajectory_timeSVHow long trajectory lines stay visible (seconds)20
sv_grenade_trajectory_prac_pipreviewSVShow grenade landing preview while holding0
sv_grenade_trajectory_prac_trailtimeSVTrail time for practice grenade trajectories10
sv_showimpactsSVShow bullet impact points (1=both, 2=client, 3=server)0
sv_showimpacts_timeSVHow long impact markers stay visible (seconds)4
sv_showbullethitsSVShow bullet hit visualization on players0
giveSVGive yourself a weapon or item (e.g. give weapon_ak47)
mp_damage_print_enablePrint damage dealt and received in console1
cl_grenadepreviewSVShow grenade trajectory preview while aiming0
sv_rethrow_last_grenadeSVRe-throws the last grenade you threw
mp_buy_anywhereAllow buying weapons anywhere on the map (1=on)0
mp_buytimeBuy time in seconds after round start20
mp_startmoneyStarting money at the beginning of the match800
mp_maxmoneyMaximum money a player can hold16000
mp_afterroundmoneyMoney given after every round regardless of outcome0
mp_roundtimeRound time in minutes1.92
mp_roundtime_defuseRound time for defuse maps in minutes1.92
mp_freezetimeFreeze time at round start in seconds (0 = none)15
mp_warmuptimeWarmup duration in seconds90
mp_warmup_endImmediately end the warmup period
mp_restartgameRestart the game after N seconds (e.g. mp_restartgame 1)
mp_respawn_on_death_ctCTs auto-respawn on death (1=on)0
mp_respawn_on_death_tTerrorists auto-respawn on death (1=on)0
mp_respawn_immunitytimeSeconds of spawn protection4
sv_regeneration_force_onSVForce health regeneration0
ent_fireSVFire an entity input (advanced map manipulation)
🤖

Bot Commands

Add, remove, and control bots in private/practice matches.

14
命令说明默认值
bot_addAdd a bot to the game (auto team balance)
bot_add_tAdd a bot to the Terrorist team
bot_add_ctAdd a bot to the Counter-Terrorist team
bot_kickKick all bots from the server
bot_stopSVFreeze all bots in place (1=frozen, 0=normal)0
bot_mimicSVBots mimic player movements (1=on)0
bot_crouchSVForce bots to crouch (1=on)0
bot_placeSVPlace a bot at your crosshair position
bot_difficultyBot difficulty level (0=easy, 1=normal, 2=hard, 3=expert)1
bot_dont_shootSVPrevent bots from shooting (1=no shooting)0
bot_knives_onlySVBots use only knives (1=on)0
bot_zombieSVBots stand still and don't react (1=on)0
bot_quotaMaximum number of bots allowed10
bot_quota_modeBot fill mode (normal, fill, match)normal
🖧

Server & Match

Server administration and match settings for private servers.

20
命令说明默认值
changelevelChange to a different map (e.g. changelevel de_mirage)
mapLoad a map and restart the server (e.g. map de_dust2)
game_modeSet game mode (0=casual, 1=competitive, 2=wingman)0
game_typeSet game type (0=classic, 1=arms race, etc.)0
mp_autoteambalanceAuto-balance teams (0=off, 1=on)1
mp_limitteamsMax player imbalance between teams (0=no limit)2
mp_timelimitTime limit per map in minutes (0=none)0
mp_maxroundsMax rounds per half30
mp_overtime_enableEnable overtime in competitive (1=on)0
mp_overtime_maxroundsMax rounds in overtime6
mp_halftimeEnable halftime (1=on)1
mp_friendlyfireEnable friendly fire (0=off, 1=on)1
mp_solid_teammatesTeammates block each other (0=pass through, 1=solid)1
mp_autokickAuto-kick idle players and team killers1
sv_passwordServer password (empty = public)
sv_lanRun server in LAN mode only (1=LAN)0
hostnameSet the server name displayed in browser
rcon_passwordRemote console password for server administration
rconExecute a remote console command (e.g. rcon sv_cheats 1)
kickKick a player by name or userid
🎬

Demo & Recording

Record and playback demos for review or content creation.

15
命令说明默认值
recordStart recording a demo (e.g. record mydemo)
stopStop recording the current demo
playdemoPlay back a recorded demo file
demouiOpen the demo playback control UI
demo_pausePause demo playback
demo_resumeResume demo playback
demo_timescaleDemo playback speed multiplier (0.25=quarter, 2=double)1
demo_gotoSkip to a specific tick number in the demo
spec_show_xrayToggle X-ray outline view in spectate/demo0
cl_draw_only_deathnoticesSVOnly show kill feed — hide HUD (for movie making)0
cl_drawhudSVHide entire HUD for clean screenshots/recordings1
sv_skynameSVChange the skybox texture (for cinematic shots)
fog_overrideSVOverride fog settings (1=enable custom fog)0
fog_enableSVEnable or disable fog (0=off, 1=on)1
screenshotTake a screenshot and save to screenshots folder
💬

Communication

Voice chat, text chat, and team communication commands.

11
命令说明默认值
+voicerecordPush-to-talk voice chat (bind to a key)
saySend a message to all players
say_teamSend a message to your team only
cl_mute_enemy_teamMute all enemy voice and text chat0
cl_mute_all_but_friends_and_partyOnly hear friends and party members0
voice_enableEnable or disable voice chat entirely1
voice_scaleVolume of other players' voice chat (0.0-1.0)1.0
ignoremsgCycle chat filter (all → team only → none → all)
player_pingPing a location for teammates (default: mouse wheel click)
cl_show_clan_in_death_noticeShow clan tags in the kill feed1
cl_clanidSet your clan tag ID
🔧

Utility & Misc

Miscellaneous commands for screenshots, workshop, and other features.

16
命令说明默认值
cl_downloadfilterDownload filter for community servers (all, nosounds, none)all
cl_disablehtmlmotdDisable HTML message of the day on community servers0
cl_join_advertiseLet friends join your game (0=off, 1=friends, 2=friends+lobby)1
gameinstructor_enableEnable in-game tips and tutorials (0=off)1
r_cleardecalsRemove all bullet holes and blood decals from surfaces
cl_colorPreferred team color (0=yellow, 1=purple, 2=green, 3=blue, 4=orange)0
cl_teammate_colors_showShow unique teammate colors (0=off, 1=on, 2=letters)1
con_filter_enableEnable console output filtering (1=highlight, 2=show only matches)0
con_filter_textConsole filter text — only show lines containing this string
developerEnable developer messages in console (0=off, 1=on, 2=verbose)0
map_workshopLoad a workshop map by its ID
workshop_subscribeSubscribe to a workshop item by ID
toggleToggle a cvar between values (e.g. toggle cl_showfps 0 1)
incrementvarIncrement a cvar (e.g. incrementvar volume 0 1 0.1)
cl_allowdownloadAllow downloading resources from servers1
cl_allowuploadAllow uploading your spray/resources to servers1

快速复制配置

常用命令组合,可直接粘贴到控制台或 autoexec.cfg 中。

Practice Server Setup

sv_cheats 1
sv_infinite_ammo 1
sv_grenade_trajectory 1
sv_grenade_trajectory_time 10
sv_showimpacts 1
mp_warmup_end
mp_freezetime 0
mp_roundtime_defuse 60
mp_buy_anywhere 1
mp_buytime 9999
mp_maxmoney 65535
mp_startmoney 65535
mp_respawn_on_death_ct 1
mp_respawn_on_death_t 1
bot_kick

FPS Optimization

fps_max 0
fps_max_ui 120
r_drawtracers_firstperson 0
cl_forcepreload 1
cl_animate_player_models 0
engine_low_latency_sleep_after_client_tick true
gameinstructor_enable 0
cl_autohelp 0
cl_showhelp 0

Competitive Network

rate 786432
cl_interp_ratio 1
cl_interp 0
cl_cmdrate 128
cl_updaterate 128
mm_dedicated_search_maxping 80

Clean HUD for Content

cl_drawhud 0
cl_draw_only_deathnotices 1
sv_skyname vertigoblue_hdr
fog_override 1
fog_enable 0
r_drawparticles 0

Pro Radar Settings

cl_radar_scale 0.35
cl_radar_always_centered 0
cl_radar_rotate 1
cl_radar_icon_scale_min 0.5
cl_hud_radar_scale 1.15
cl_radar_square_with_scoreboard 1

Audio Optimization

volume 0.4
snd_roundstart_volume 0
snd_roundend_volume 0
snd_deathcamera_volume 0
snd_mvp_volume 0
snd_menumusic_volume 0
snd_tensecondwarning_volume 0.1
snd_mute_losefocus 1
voice_scale 0.7

常见问题

如何在 CS2 中打开控制台?
打开 设置 → 游戏 → 启用开发者控制台 (~) → 设为"是"。然后在游戏中按下波浪键 (~) 即可打开控制台。你可以直接在控制台中输入任意命令。
命令和 cvar 有什么区别?
命令会立即执行一个操作(如 "quit" 或 "noclip")。cvar(控制台变量)存储一个用于更改设置的值(如 "sensitivity 2.5" 或 "cl_showfps 1")。若用 host_writeconfig 保存,cvar 会在各次会话之间保留。
控制台命令在竞技匹配中有效吗?
大多数客户端命令(cl_、hud_、crosshair)在任何地方都有效。服务器端命令(sv_、mp_)只在你拥有管理员权限的服务器或离线/私人比赛中有效。需要 sv_cheats 1 的命令在竞技模式中被禁用。
如何永久保存我的控制台设置?
在你的 CS2 cfg 文件夹(Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/)中创建一个 autoexec.cfg 文件,并将命令添加到其中。在文件末尾加上 host_writeconfig。每次启动 CS2 时,这些命令都会自动运行。
sv_cheats 1 有什么用?
sv_cheats 1 在服务器上启用受作弊保护的命令。练习命令如 noclip、god mode 和 grenade trajectory 都需要它。它只在私人/离线比赛中有效,激活时会禁用成就。
使用控制台命令会被封号吗?
不会。控制台命令是 CS2 的内置功能。使用任何控制台命令都不会被 VAC 封号。受作弊保护的命令在官方服务器上根本不会执行。

查看英文版 →