-console to the Steam launch options, or switch it on in game settings, then press the backslash key. Cheat commands need sv_cheats 1 in a local lobby.Dota 2 console commands are developer-console settings for the PC client, opened with the backslash key once the console is enabled. They adjust the camera, minimap, health bars and ability casting, and a separate group of cheats works only in local lobbies.
Cheating in public matchmaking is not possible and attempting it risks your account, so this guide sticks to settings and lobby testing. Commands here were checked against PCGamesN's command guide, with the Valve Developer Community and Liquipedia lists used to confirm that cheat-flagged commands need a private server. For other console-driven games see FiveM console commands, World of Warcraft console commands and Unreal Engine 4 console commands. The full hub is all game cheat codes.
How to enable the Dota 2 console
The console is off by default and must be switched on. There are two ways to do it.
- Settings: open the Game section of the options and enable the console in the miscellaneous settings.
- Launch option: in Steam, right-click Dota 2, open Properties and add
-consoleto the launch options. A search summary of other guides also mentions+con_enable 1.
Press the backslash key to open the console. Some keyboard layouts use tilde instead. Type a command and press Enter. This is a PC feature, and no source describes a console on other platforms.
Dota 2 console commands list
Most toggles take 1 for on and 0 for off. PCGamesN notes that true and false also work. Replace x with your own number.
| Command | What it does |
|---|---|
dota_ability_quick_cast 1 |
Casts abilities at the target immediately. |
dota_item_double_tap_self_cast 1 |
Double-tap an item key to self-cast. |
dota_ability_self_cast_timeout x |
Sets the double-tap window in seconds. Default 0.6. |
dota_camera_disable_zoom 1 |
Disables mousewheel zoom. |
dota_camera_distance x |
Sets camera distance. Default 1200. |
dota_hud_healthbars x |
Healthbar style: 0 off, 1 solid, 2 segmented. |
dota_hud_hide_minimap 1 |
Hides the minimap. |
dota_hud_hide_topbar 1 |
Hides the top HUD bar. |
dota_hud_colorblind 1 |
Turns on colorblind mode. |
dota_minimap_simple_colors 1 |
Allies green and enemies red on the minimap. |
dota_range_display x |
Shows a ring around your hero at range x. |
dota_screen_shake 0 |
Disables screen shake. |
dota_hud_netgraph 1 |
Shows network readouts. |
dota_ping |
Shows your current ping. |
status |
Shows player stats, ping and packet loss. |
echo [text] |
Prints text to the console, handy for checking an autoexec. |
disconnect |
Leaves the current server. |
quit |
Closes Dota 2. |
Commands for testing in a lobby
These need a local game with cheats on, not a public match. Liquipedia's list marks which commands are cheat-flagged and says they will not work on public servers.
| Command | What it does |
|---|---|
sv_cheats 1 |
Enables cheat-flagged commands. |
dota_create_unit [name] |
Spawns a named unit at the cursor. |
cl_dota_gridnav_show 1 |
Shows walkable (green) and blocked (red) grid. |
dota_unit_show_collision_radius 1 |
Shows unit and building hitboxes. |
dota_show_nav_obstructions 1 |
Shows terrain obstructions such as walls and cliffs. |
fow_client_visibility 1 |
Removes the darkened fog effect. |
map [name] |
Loads a map. Some maps may crash. |
maps |
Lists available maps. |
How to enable cheats in Dota 2
Cheats are available in a custom lobby or bot match you create yourself. Tick the enable cheats option when creating the lobby, and run sv_cheats 1 if a command still refuses to work.
Chat cheats start with a hyphen and are typed in the normal chat box, not the console. For example, type -lvlup 5 to gain five levels.
| Command | What it does |
|---|---|
-lvlup x |
Raises your hero level by x. |
-levelbots x |
Raises bot hero levels by x. |
-gold x |
Adds gold. A negative number removes it. |
-item [name] |
Gives your hero an item. |
-givebots [name] |
Gives bots an item. |
-refresh |
Restores health, mana and cooldowns. |
-respawn |
Respawns your hero, or sends it to the fountain if alive. |
-teleport |
Teleports your hero to the cursor. |
-startgame |
Skips warmup and starts the game. |
-spawncreeps |
Spawns a creep wave for both teams. |
-disablecreepspawn |
Stops regular creep and neutral spawns. |
-enablecreepspawn |
Restores regular spawns. |
-killcreeps radiant/dire/neutral/all |
Kills the chosen creep type. |
-spawnrunes |
Spawns runes at all rune spots. |
-allvision |
Shares vision between teams. |
-wtf |
Removes mana costs and cooldowns. |
-unwtf |
Turns wtf mode off. |
-hurtmebad |
Sets hero health to 1. |
-win |
Destroys the enemy Ancient and ends the match. |
Further chat cheats include -spawnneutrals, -clearwards, -killwards, -trees, -normalvision, -enablecreepspawn and -suicide, per the PCGamesN list.
How to use an autoexec file
Commands typed in the console often reset the next time the game launches. An autoexec file fixes that. Create autoexec.cfg in the game\dota\cfg folder inside the Dota 2 install folder and list one command per line. A simple echo line is a quick way to confirm the file ran.
Show attack range and grid with the console
Two commands help most players. dota_range_display 650 draws a ring at that range around your hero, which is useful for learning ability ranges in a bot game. cl_dota_gridnav_show 1 paints walkable ground green and blocked ground red, handy when planning blocks and pulls.
Why Dota 2 console commands are not working
- The backslash key does nothing: the console is not enabled yet. Add -console to the launch options and restart.
- A command is rejected: it is cheat-flagged. Use a local lobby with cheats on and run sv_cheats 1.
- Chat cheats do nothing in the console: they begin with a hyphen and go in the chat box.
- Settings vanish after restarting: put them in autoexec.cfg.
- Map or free camera misbehaves: the guide warns some maps may crash, and the free camera is for replays and spectating only.
Dota 2 console commands FAQ
How do I enable the console in Dota 2?
Turn it on in the miscellaneous options under the Game section, or add -console to the Dota 2 launch options in Steam. Then press the backslash key in game.
What are the Dota 2 console commands?
Popular ones include dota_range_display, dota_camera_distance, dota_hud_healthbars, cl_dota_gridnav_show and status. Cheat commands such as sv_cheats 1 only work in local lobbies.
How do I enable cheats in Dota 2?
Create a custom lobby or bot match and tick enable cheats, then use sv_cheats 1 if needed. Chat cheats like -gold and -lvlup start with a hyphen.
Can I use Dota 2 console commands in ranked games?
Settings commands work, but cheat-flagged commands do not run on public servers. Trying to cheat online can put your account at risk, so keep cheats to local lobbies.
What key opens the Dota 2 console?
The backslash key opens it by default once the console is enabled. Depending on your keyboard layout it can be tilde instead.
How do I save Dota 2 console commands?
Create autoexec.cfg in game\dota\cfg and list your commands, one per line. They run each time the game starts, so settings no longer reset.
More cheat guides
- Medieval 2 Console Commands: Money, Fog of War, Units
- Imperator Rome Console Commands: Debug Mode, Cash, Tech, Tag
- Victoria 3 Console Commands: Debug Mode, Money, Tag, Annex
- Civ 6 Console Commands: Enable the Debug Console, Reveal All
- Terra Invicta Console Commands: Enable and Command List
- Warhammer 3 Console Commands: Gold, Units and How to Enable
- All Strategy cheat codes
- All game cheat codes
Sources
- PCGamesN – Dota 2 console commands and cheats
- Liquipedia Dota 2 – Console command
- Valve Developer Community – List of Dota 2 console commands and variables
Leave a Reply