Below is a searchable list of 116 cheats and console commands from Left 4 Dead 2 on PC / Mac. These L4D2 cheats are up-to-date for the latest version of the game on Steam, working for both single player and multiplayer.
You can turn on the console in L4D2 by changing the developer console setting to enabled. To do this, go to Options > Keyboard/Mouse > Allow Developer Console > Enabled. Once enabled, you can open the console by pressing the ` (grave) key on your keyboard. For some, pressing the ~ (tilde) tilde key will work. To run commands, type them into the console and hit enter/return on your keyboard. For more help using the L4D2 console, see our Left 4 Dead 2 Console Guide.
Some commands require sv_cheats to be set to 1 in order to work - these are indicated with the sv_cheats tag in their description. Commands that have a default value are also indicated with a badge.
Type the name of a L4D2 cheat into the search bar below to instantly search all 116 cheat codes stored in our database. You can find additional information, and useful examples, for each command by visiting its command page. Use the "Table View" and "Card View" buttons to switch between list layouts.
Name | Syntax | Description |
---|---|---|
god | god [0 / 1] | This cheat enables (if set to 1) and disables god mode for your entire team. In god mode, you and your team are invincible and will not take any damage. sv_cheats Default Value: 0 |
noclip | noclip | This cheat enables and disables (toggles) no clip mode. In noclip mode, you do not collide with walls, objects, etc, allowing you to fly through/to any part of the map. |
upgrade_add | upgrade_add [upgrade id] | This cheat will add the specified upgrade to your character. See command page for all upgrades that you can add with this command. |
sv_infinite_ammo | sv_infinite_ammo [0 / 1] | This command enables (if set to 1) and disables infinite ammo for your weapon. Obviously, with unlimited ammo, you will never run out of ammo for any of your weapons. sv_cheats Default Value: 0 |
sv_infinite_primary_ammo | sv_infinite_primary_ammo [0 / 1] | This command, if set to 1, will enable infinite ammo for your primary weapon (not your secondary weapon). By default, this command is set to 0 (disabled). sv_cheats Default Value: 0 |
give | give [item id] | This command will give you the specified weapon or item (or health/ammo). See command page for a list of weapons, items, and other things that you can give with this command. |
impulse | impulse [number] | This console command has a number of functions, dependent on the number you provide as an argument. Functions include refilling ammo, health, and removing entities. See argument information for a list of possible numbers and functions. |
z_spawn | z_spawn [npc id] | This command will spawn the NPC with the specified ID. See command page for NPC IDs. |
map | map [map id] | This command will load the specified map (from the start menu). See command page for a list of all maps. |
changelevel | changelevel [map id] | This command will switch the current map you are playing on to the specified map. To load a map from the start menu, use the map command. Find a list of all map IDs at commands.gg/l4d2/map. |
buddha | buddha [0 / 1] | This command enables "Buddha" mode, if set to 1. In Buddha mode, you will still appear to take damage, but will not die when you health reaches 0. This command is similar to god, but with the god command, you don't react to/take damage. sv_cheats Default Value: 0 |
burn | burn | This command ignites your character (setting you on fire), but you do not take damage. You can set fire to other flammable objects/entities by colliding with them (e.g. jumping on them). |
hidehud | hidehud [setting #] | This command can be used to hide the entire HUD (set to 4), or hide specific parts of the HUD (e.g. set to 256 to hide crosshair). See argument information for all parts of the HUD that you can hide. sv_cheats Default Value: 0 |
sb_friendlyfire | sb_friendlyfire [0 / 1] | This command, if set to 1, will allow bots to deal friendly fire damage. By default, this is set to 0 (bots can't do friendly fire damage). sv_cheats Default Value: 0 |
sb_takecontrol | sb_takecontrol [character name] | This command will make you take control of the character under your crosshair (or the closest survivor to your crosshair, if your crosshair is not over a survivor). If you specify the name of a character as an argument, you will take control of the survivor with that name, rather than the closest survivor to your crosshair. |
z_pounce_damage | z_pounce_damage [amount] | This cheat sets the amount of damage a zombie does to your health when they pounce on you. By default, this is set to 5. sv_cheats Default Value: 5 |
sv_noclipspeed | sv_noclipspeed [speed] | This cheat sets the speed you fly/move at when in noclip mode. By default, this is set to 5. Default Value: 5 |
sb_open_fire | sb_open_fire [0 / 1] | This command, if set to 1, will make all bots fire continuously (until they run out of ammo). By default, this is disabled (set to 0). sv_cheats Default Value: 0 |
z_health | z_health [amount] | This command sets the maximum amount of health a zombie can have. Default is 50. sv_cheats Default Value: 50 |
z_speed | z_speed [speed] | This command sets the maximum speed zombies can accelerate to when moving. By default, this is set to 250. sv_cheats Default Value: 250 |
tongue_range | tongue_range [distance] | This cheat sets the maximum range of the tongue attack of the Smoker. This is set to 750 by default - higher values mean it has more range, lower values mean it has less. sv_cheats Default Value: 750 |
bot_mimic | bot_mimic [0 / 1] | This command, if enabled (set to 1), will make all bots mimic you actions. For example, if you move forward, all bots will also move forward. sv_cheats Default Value: 0 |
nb_stop | nb_stop [0 / 1] | This command, if set to 1 (which enables it), will freeze all bots in the game. Setting this command back to 0 will unfreeze the bots. sv_cheats Default Value: 0 |
host_timescale | host_timescale [timescale] | This command changes the "timescale" of the game - i.e. what speed the game processes/runs at. Setting this command to 2 would make the game run two times as fast (as-if it were in fast forward), whereas setting this command to 0.5 would make the game run in slow motion (half as fast). sv_cheats Default Value: 1 |
director_force_panic_event | director_force_panic_event | This command will force start a panic event. |
director_panic_forever | director_panic_forever [0 / 1] | This cheat, if set to 1, will turn on never-ending panic, causing all characters to panic until this command is set back to 0. sv_cheats Default Value: 0 |
ent_create | ent_create [entity id] | This command will spawn the specified entity at the location your crosshair is over. |
ent_setname | ent_setname [entity name] | This command sets the name of the entity under your crosshair. |
ent_remove | ent_remove [entity / class name] | This command will delete (remove) the entity under your crosshair, or if you specify an entity/class name, the entity that matches will be deleted. |
ent_remove_all | ent_remove_all [entity / class name] | This command deletes all existing entities of the given type. |
z_common_limit | z_common_limit [amount] | This command sets the maximum amount of normal zombies that can be present in the world at any given time. This is set to 30 by default. sv_cheats Default Value: 30 |
z_frustration_lifetime | z_frustration_lifetime [seconds] | This command sets the amount of time, in seconds, it takes for the frustration meter of The Tank to reach full (frustration rises when the survivors are not in sight). After the frustration meter reaches full, the AI will take over control of The Tank, raise the value of this command to prevent this from happening. Default is 20 seconds. sv_cheats Default Value: 20 |
sv_infected_ceda_vomitjar_probability | sv_infected_ceda_vomitjar_probability [chance] | This command sets the chance (as a decimal percentage) a CEDA agent has to be carrying a bile jar. By default, this is set to 0.1 (10%). sv_cheats Default Value: 0.1 |
director_stop | director_stop | This command will stop the spawning of all wanderers, mobs, specials, and bosses. Use director_start to re-enable. |
director_start | director_start | This command will re-enable the spawning of all wanderers, mobs, specials, and bosses after having disabled them with director_stop. |
thirdperson | thirdperson | This command will put you in third person mode. |
crosshair | crosshair [0 / 1] | This command, if set to 0, will disable your your crosshair. By default this command is set to 1 (crosshair enabled). Default Value: 1 |
thirdpersonshoulder | thirdpersonshoulder | This command switches your camera to "over the shoulder" third person view. |
thirdperson_mayamode | thirdperson_mayamode | This command toggles mayamode for third person, in maya mode, the camera will stick in its current third person position and will not rotate to stay behind your character. In other words, the camera will stay in a fixed position facing you, but it will not move around you as you look around. |
firstperson | firstperson | This command will put you in first person mode (if not already in first person mode). |
sv_cheats | sv_cheats [0 / 1] | This command, when set to 1 (default is 0), allows the use of cheat commands on your current map or server. Default Value: 0 |
kill | kill | This cheat will set your health to 0, killing you. |
explode | explode | This command will kill you by creating an explosion under your character. |
quit | quit | This command will quit the game. |
jointeam | jointeam [team # / team name / character] | This command will make you join the specified team. The team can be specified by its team number, its name, or a character's name. |
spectate | spectate | This command has been reported as not working - it should put you in spectator mode on servers. |
kick | kick [name] | This command will kick the player with the specified name from the server. |
bind | bind [key] [command(s)] | This command will bind the specified command(s) to the specified key. |
fire | fire | This command will spawn fire on the ground around your character (it will deal damage to you, so be sure to run outside of the fire after using this command). |
boom | boom | This cheat will spawn a pipe bomb under your character, which will detonate (and deal damage) after a few seconds. |
sb_all_bot_game | sb_all_bot_game [0 / 1] | This command, if set to 1, will allow for your game/server to continue on with just bots and no players. sv_cheats Default Value: 0 |
sb_stop | sb_stop [0 / 1] | This command, if set to 1, will stop (and freeze in their current positions) all survivor bots, but not zombie bots. sv_cheats Default Value: 0 |
sb_unstick | sb_unstick [0 / 1] | This command, if set to 0, will stop bots from teleporting to "unstick" themselves from locations. The default setting for this command is 1, which allow bots to teleport themselves out of locations they get stuck inside. sv_cheats Default Value: 1 |
vs_max_team_switches | vs_max_team_switches [amount] | This command sets the maximum amount of team switches that players can make. Default is 1 - set this to a higher number to allow yourself or other players to switch teams more than once. sv_cheats Default Value: 1 |
warp_all_survivors_here | warp_all_survivors_here | This command teleports all survivors to your current location. |
warp_all_survivors_to_battlefield | warp_all_survivors_to_battlefield | This command teleports all survivors to your map's battlefield (if it has one). |
warp_all_survivors_to_checkpoint | warp_all_survivors_to_checkpoint | This command teleports all survivors to the current checkpoint that you are at in your map. |
warp_all_survivors_to_finale | warp_all_survivors_to_finale | This command teleports all survivors to the map's "finale". |
warp_far_survivor_here | warp_far_survivor_here | This command teleports the survivor that is furthest away from you to the location your crosshair is over. |
warp_to_start_area | warp_to_start_area | This command teleports you to the start location for your current map. |
mat_fullbright | mat_fullbright [0 / 1 / 2] | This command, if set to 1, will enable "full bright" mode, in which all areas of the map are at the maximum lighting level (as-if it were daytime, even in the darkest areas). Setting this command to 2 removes textures from all objects (and sets brightness to max). sv_cheats Default Value: 0 |
fog_override | fog_override [0 / 1] | This command, if set to 1, will allow you to override your current map's fog settings (with commands like fog_enable, etc). sv_cheats Default Value: 0 |
fog_enable | fog_enable [0 / 1] | Note that you need to set fog_override to 1 in order for this command to have any effect. This command will enable and disable fog effects on your current map. sv_cheats Default Value: 1 |
connect | connect [ip address] | This command will connect to the L4D2 server at the specified IP address |
chooseteam | chooseteam | If it is an option on your current server/map, this command will open up the menu to allow you to choose a team. |
rescue_distance | rescue_distance [distance] | This command sets how far your teammates must travel past your body before you can be rescued. Default is 4,500. sv_cheats Default Value: 4500 |
rescue_min_dead_time | rescue_min_dead_time [seconds] | This command sets how long, in seconds, you or a teammate must be dead for before you can be rescued by another teammate. sv_cheats Default Value: 60 |
hunter_pz_claw_dmg | hunter_pz_claw_dmg [damage] | This command sets how much damage a PZ hunter's melee attack will deal. sv_cheats Default Value: 6 |
tongue_choke_damage_amount | tongue_choke_damage_amount [damage] | This command sets how much damage a Smoker's tongue choke attack will deal. Default damage is 10. sv_cheats Default Value: 10 |
z_hit_from_behind_factor | z_hit_from_behind_factor [multiplier] | This command sets how much more damage a hit from a zombie from behind will deal to you (i.e. if they hit your back). Default is 0, which means there is no extra damage. 0.5 would add 0.5x the dealt damage to the total (so 50% more damage). sv_cheats Default Value: 0 |
inferno_damage | inferno_damage [damage] | This command sets the amount of damage dealt per second by flames and molotovs. Default is 40. sv_cheats Default Value: 40 |
z_gun_damage | z_gun_damage [damage] | This command sets the amount of damage dealt to doors, boxes, walls, and other breakable objects by melee attacks. sv_cheats Default Value: 10 |
sv_lan | sv_lan [0 / 1] | This command, if set to 1, will make the server you are currently on a LAN server. A LAN server does not require a connection to the internet to run. This setting disables authentication, the heartbeat to Steam servers, and other features that require a connection to the internet. Default Value: 0 |
sv_allow_lobby_connect_only | sv_allow_lobby_connect_only [0 / 1] | This command, if set to 1, will only allow players to connect to your server from the matchmaking lobby, and will not be able to connect directly (e.g. through Steam invite or connect command). If you want a player to be able to connect to your server mid-game, set this command to 0. Default Value: 1 |
z_witch_burn_time | z_witch_burn_time [seconds] | This command sets the amount of time, in seconds, a witch can burn for before they die from fire damage. Default is 15 seconds. sv_cheats Default Value: 15 |
z_witch_allow_change_victim | z_witch_allow_change_victim [0 / 1] | This command, if set to 1, will allow witches to change targets. If set to 0 (default), witches will lock onto the character that they first noticed/became aggressive to, and not switch target. sv_cheats Default Value: 1 |
z_witch_damage | z_witch_damage [amount] | This command sets the amount of damage a witch attack deals. Default is 100. sv_cheats Default Value: 100 |
z_witch_anger_rate | z_witch_anger_rate [rate] | This command sets how close you can get to a witch before startling her. Default is 0.2, setting this command to 0 would allow you to get very close without startling, a higher number would make it easier to startle witches. sv_cheats Default Value: 0.2 |
cl_precacheinfo | cl_precacheinfo | This command prints to console information about the client's cache. |
director_force_versus_start | director_force_versus_start | This command will forcefully start your current versus game (without you leaving the safe room). |
z_tank_health | z_tank_health [health] | This command sets the maximum and default health (what they spawn with) of the Tank zombie. Default is 4,000. sv_cheats Default Value: 4000 |
z_tank_rock_debug | z_tank_rock_debug [0 / 1] | This command, if set to 1, enables debug for the rock Tank zombie. This debug information displays when it is thinking about detonating survivors. sv_cheats Default Value: 0 |
z_tank_throw_interval | z_tank_throw_interval [seconds] | This command sets the minimum cooldown, in seconds, between each throw attack from a Tank (i.e. they have to wait at least this amount of time after using a throw attack before being able to use another one). sv_cheats Default Value: 5 |
z_vomit_debug | z_vomit_debug [0 / 1] | This command, if set to 1, enables debug information for vomit attacks from a Puker. sv_cheats Default Value: 0 |
z_vomit_interval | z_vomit_interval [seconds] | This command sets the amount of time, in seconds, a Puker zombie must wait between each vomit attack. sv_cheats Default Value: 30 |
r_flashlightconstant | r_flashlightconstant [constant] | This command sets the constant for your flashlight - i.e. how fast the light from your flashlight drops off. With this at a higher number, your flashlight will be more effective at further distances. sv_cheats Default Value: 0 |
r_flashlightfov | r_flashlightfov [fov] | This command sets the field-of-view (FOV) for your flashlight. The FOV is how wide the light of your flashlight is. With this at a higher number, the light from your flashlight will be more spread out (cover more area). sv_cheats Default Value: 53 |
r_flashlightfar | r_flashlightfar [distance] | This command sets the maximum distance your flashlight can light up. Default is 750. sv_cheats Default Value: 750 |
setinfo | setinfo [key] [value] | This command sets the specified info value for your client. This can be used to change your name by specifying "name" as the key (and then your desired name as the value). |
director_no_survivor_bots | director_no_survivor_bots [0 / 1] | This command, if set to 1, will disable survivor bots, meaning the only players on your team will be yourself (and any other human players). sv_cheats Default Value: 0 |
director_no_mobs | director_no_mobs [0 / 1] | This command, if set to 1, will disable mob rushes. By default this is set to 0 (meaning mob rushes are enabled). sv_cheats Default Value: 0 |
director_no_bosses | director_no_bosses [0 / 1] | Setting this command to 1 will completely disable the spawning of bosses. sv_cheats Default Value: 0 |
director_no_specials | director_no_specials [0 / 1] | This command, if set to 1, will disable the spawning of PZ zombies. sv_cheats Default Value: 0 |
director_debug_scavenge_items | director_debug_scavenge_items [0 / 1] | This command, if set to 1, will highlight all possible item spawns, and also all spawned items currently on the ground. sv_cheats Default Value: 0 |
director_debug | director_debug [0 / 1] | This command, if set to 1, enables debug information for the game's AI (puts lots of data on your screen). sv_cheats Default Value: 0 |
upgrade_explosive_bullet_force | upgrade_explosive_bullet_force [amount] | This command sets the explosive force of bullets from weapons (other than the shotgun) with the explosive ammo upgrade. sv_cheats Default Value: 2 |
upgrade_explosive_slug_force | upgrade_explosive_slug_force [amount] | This command sets the explosive force for bullets from shotguns that have the explosive ammo upgrade. sv_cheats Default Value: 4 |
upgrade_show_explosive_ammo_radius | upgrade_show_explosive_ammo_radius [0 / 1] | This command, if set to 1, will show the effective range of an explosion when an explosive bullet detonates. sv_cheats Default Value: 0 |
z_forcezombiemodelname | z_forcezombiemodelname [model name] | This command sets the model that is used for all zombies, if you have enabled z_forcezombiemodel. sv_cheats Default Value: 0 |
z_forcezombiemodel | z_forcezombiemodel [0 / 1] | This command, if set to 1, allows you to force all zombies to have the model set by the z_forcezombiemodelname command. sv_cheats Default Value: 0 |
z_fallen_max_count | z_fallen_max_count [amount] | This command sets the maximum amount of Fallen Survivors that can be present at any given time. Once there are this amount of Fallen Survivors, no more will spawn. sv_cheats Default Value: 1 |
z_mob_spawn_min_interval_expert | z_mob_spawn_min_interval_expert [seconds] | This command sets the minimum interval, in seconds, between each expert zombie mob spawn. sv_cheats Default Value: 90 |
z_mob_spawn_max_interval_expert | z_mob_spawn_max_interval_expert [seconds] | This command sets the maximum interval, in seconds, between each expert zombie mob spawn. sv_cheats Default Value: 180 |
z_mob_spawn_min_size | z_mob_spawn_min_size [amount] | This command sets the minimum amount of zombies that will spawn in a mob. sv_cheats Default Value: 10 |
z_mob_spawn_max_size | z_mob_spawn_max_size [amount] | This command sets the maximum amount of zombies that will spawn in a mob. sv_cheats Default Value: 30 |
z_mega_mob_spawn_min_interval | z_mega_mob_spawn_min_interval [seconds] | This command sets the minimum spawn interval, in seconds, between each mega mob spawn. sv_cheats Default Value: 420 |
z_mega_mob_spawn_max_interval | z_mega_mob_spawn_max_interval [seconds] | This command sets the maximum spawn interval, in seconds, between each mega mob spawn. sv_cheats Default Value: 900 |
z_mega_mob_size | z_mega_mob_size [amount] | This command sets the amount of zombies that spawn in a mega mob spawn. sv_cheats Default Value: 50 |
z_must_wander | z_must_wander [-1 / 0 / 1] | This command sets whether zombies always wander, always sit or lie down, or do both (both is default). sv_cheats Default Value: 0 |
z_acquire_far_range | z_acquire_far_range [range] | This command sets the furthest range at which a zombie can "lock on" or "locate" a survivor - i.e. zombies will walk towards/attack survivors within this range. sv_cheats Default Value: 2500 |
z_acquire_far_time | z_acquire_far_time [seconds] | This command sets the amount of time, in seconds, that a survivor must be within a zombie's range before they are noticed by the zombie and the zombie walks towards them/attacks. sv_cheats Default Value: 5 |
z_acquire_near_range | z_acquire_near_range [range] | This command sets the range at which zombies will attack survivors instantly within (i.e. they will instantly lock onto survivors that get this close). sv_cheats Default Value: 200 |
z_acquire_near_time | z_acquire_near_time [seconds] | This command sets the amount of time it takes, in seconds, for a zombie to notice a survivor within the range set by z_acquire_near_range. sv_cheats Default Value: 0 |
z_special_spawn_interval | z_special_spawn_interval [seconds] | This command sets the amount of time, in seconds, between each "special" or "boss" zombie spawn. sv_cheats Default Value: 45 |
z_hunter_limit | z_hunter_limit [amount] | This command sets the maximum amount of "The Hunter" zombies that can be present in the game at any given time - i.e. if this is set to 1, no other Hunter zombies will spawn whilst there is one present. sv_cheats Default Value: 1 |
z_minion_limit | z_minion_limit [amount] | This command sets the maximum amount of "special infected" zombies that can be in the game at any given time. Once this amount of special infected zombies present in the game, no more will spawn (until one is killed). sv_cheats Default Value: 3 |