Half-Life 2 Console Commands & Cheat Codes

Photo of author
By:
Updated:

Half-Life 2 is a first-person sci-fi game available on Steam for PC, and a direct sequel to Half-Life.

You play as Gordon Freeman, a scientist who awakens years after the Black Mesa incident and discovers that Earth has been conquered by an alien empire known as the Combine.

The story takes place in City 17, an occupied city where Gordon joins Alyx Vance and the human resistance in their fight to free Earth.

Throughout the game, you’ll travel through City 17, abandoned towns, canals, and other dangerous areas while battling Combine soldiers, alien creatures, and other threats.

In this guide, you’ll find the complete Half-Life 2 Console Commands and Cheat Codes, along with instructions on how to enable and use the console in the game.

How to enable and use the console

Step 1: Enable the Developer Console

  1. Open Half-Life 2 and go to Options →→ Keyboard.
  2. Click Advanced… and check the box for “Enable Developer Console (~)”.
  3. Press the tilde key (~) on your keyboard to open the console during gameplay.

Note: If the console doesn’t open, rebind the console toggle key under the Keyboard options menu.

Step 2: Enable Cheats

Open the console and type the following command to activate cheats:

bashsv_cheats 1

Note: To disable cheats at any time, type sv_cheats 0.

Some general commands do not require sv_cheats 1 to work. You can try running them first without enabling cheats.

Half-Life 2 Console Commands & Cheat Codes

Essential & General Cheats

CommandEffect
godInvincibility (God Mode)
buddhaTakes damage, but health never drops below 1
sv_infinite_aux_power 1Infinite Suit Power (Sprint, Flashlight, Oxygen)
noclipFly through walls and terrain (Ghost Mode)
sv_noclipspeed <number>Adjust noclip movement speed
notargetNPCs ignore the player
killInstant suicide
npc_killKills all NPCs in the immediate area
ai_disableFreezes all NPC movement and AI
shakeTriggers camera shake effect
impulse 101Gives all standard HL2 weapons and full ammo
impulse 102Spawns human skulls

Vehicle & World Spawning

CommandEffect
ch_createjeep or impulse 82Spawns the Scout Car (Jeep)
ch_createairboat or impulse 83Spawns the Airboat
ent_fire prop_vehicle_airboat enablegun 1Equips the mounted gun onto the Airboat
physcannon_mega_enabled 1Equips the Supercharged (Dark Matter) Gravity Gun
physcannon_maxforce <number>Adjusts Gravity Gun launch force
ent_fire !picker igniteIgnites whatever object or NPC you are aiming at
impulse 203Deletes the entity you are looking at
ent_removeRemoves the aimed entity

Weapons & Spawning

To spawn weapons, use give <weapon_name>.

bashgive weapon_physcannon

Weapon List

  • weapon_crowbar — Crowbar
  • weapon_physcannon — Gravity Gun
  • weapon_stunstick — Stunstick (Restores +7% Suit Power on pickup)
  • weapon_pistol — 9mm Pistol
  • weapon_357 — .357 Magnum
  • weapon_smg1 — Submachine Gun (SMG)
  • weapon_ar2 — Overwatch Pulse Rifle
  • weapon_shotgun — Shotgun
  • weapon_crossbow — Crossbow
  • weapon_frag — Fragmentation Grenade
  • weapon_rpg — RPG Rocket Launcher
  • weapon_bugbait — Pheropods (Bugbait)
  • weapon_alyxgun — Alyx’s Pistol (Must pick up off ground)
  • weapon_annabelle — Father Grigori’s Rifle
  • weapon_cubemap — Level Design Mapping Tool

Episode / Bonus Weapons

  • weapon_portalgun — Portal Gun (Portal only)
  • weapon_hopwire — Hopwire Grenade
  • weapon_striderbuster — Strider Buster (EP1 / EP2)
  • weapon_oldmanharpoon — Harpoon Launcher (Lost Coast only)
  • weapon_citizensuitcase — Suitcase
  • weapon_citizenpackage — Cardboard Box Package

Remove a Specific Weapon:
Use ent_remove <weapon_name> (e.g., ent_remove weapon_crossbow).

Items & Ammo Commands

Use give <item_name> or ent_create <item_name>:

CommandDescription
givecurrentammoGives full ammo for the currently held weapon
give item_healthkitHealth Kit
give item_healthvialHealth Vial
give item_suitHEV Suit
give item_batteryHEV Suit Battery
give item_healthchargerWall Health Charger
give item_suitchargerWall Suit Charger
give item_ammo_pistol9mm Pistol Ammo
give item_box_srounds9mm Pistol Ammo Box
give item_ammo_357.357 Magnum Ammo
give item_ammo_smg1SMG Ammo
give item_box_mroundsSMG Ammo Box
give item_ammo_smg1_grenadeSMG Grenade Launcher Ammo
give item_ar2_grenadeSMG Secondary Grenades
give item_ammo_ar2Pulse Rifle Ammo
give item_box_lroundsPulse Rifle Ammo Box
give item_ammo_ar2_altfirePulse Rifle Energy Orb
give item_ammo_crossbowCrossbow Bolts
give item_box_buckshotShotgun Shells Box
give item_rpg_roundRPG Rocket
give item_ml_grenadeRPG Grenade
ent_create item_box_flare_roundsSpawns Flare Rounds at crosshair
ent_create item_box_sniper_roundsSpawns Sniper Rounds at crosshair

Weapon Damage & Max Ammo Tweaks

Change values by replacing # with your desired numerical value.

Max Ammo Settings

bashsk_max_pistol #           # Pistol Max Ammosk_max_357 #              # .357 Magnum Max Ammosk_max_smg1 #             # SMG Max Ammosk_max_smg1_grenade #     # SMG Grenade Max Ammosk_max_ar2 #              # Pulse Rifle Max Ammosk_max_ar2_altfire #      # Pulse Rifle Orbs Max Ammosk_max_shotgun #          # Shotgun Max Ammosk_max_crossbow #         # Crossbow Max Ammosk_max_grenade #          # Frag Grenade Max Ammosk_max_rpg_round #        # RPG Rocket Max Ammo

Player Weapon Damage Settings

bashsk_plr_dmg_crowbar #      # Crowbar Damagesk_plr_dmg_pistol #       # Pistol Damagesk_plr_dmg_357 #          # .357 Magnum Damagesk_plr_dmg_smg1 #         # SMG Damagesk_plr_dmg_smg1_grenade # # SMG Grenade Damagesk_plr_dmg_ar2 #          # Pulse Rifle Damagesk_plr_dmg_buckshot #     # Shotgun Damagesk_plr_dmg_crossbow #     # Crossbow Damagesk_plr_dmg_grenade #      # Frag Grenade Damagesk_plr_dmg_rpg_round #    # RPG Rocket Damage

Warning: Setting weapon damage values excessively high can cause the game engine to freeze.

NPC Commands

Spawning NPCs

Syntax: npc_create npc_<name>

bashnpc_create npc_combine_s

Friendly NPCs

  • alyx — Alyx Vance
  • barney — Barney Calhoun
  • dog — Dog
  • kleiner — Dr. Kleiner
  • eli — Eli Vance
  • mossman — Dr. Judith Mossman
  • monk — Father Grigori
  • citizen — Rebel / Citizen
  • vortigaunt — Vortigaunt

Enemy NPCs

  • combine_s — Combine Soldier / Elite / Prison Guard
  • metropolice — Metro Cop
  • stalker — Stalker
  • headcrab — Standard Headcrab
  • headcrab_fast — Fast Headcrab
  • headcrab_black / headcrab_poison — Poison Headcrab
  • zombie — Standard Zombie
  • zombie_torso — Zombie Torso
  • fastzombie — Fast Zombie
  • poisonzombie — Poison Zombie
  • zombine — Zombine (Best used in EP1)
  • antlion — Antlion
  • antlionguard — Antlion Guard
  • ichthyosaur — Ichthyosaur
  • barnacle — Barnacle
  • sniper — Combine Sniper

Synthetic & Autonomous Enemies

  • strider — Strider
  • combinegunship — Gunship
  • combinedropship — Dropship
  • manhack — Manhack
  • cscanner — City Scanner
  • clawscanner — Shield Scanner
  • rollermine — Rollermine
  • combine_mine — Hopper Mine
  • turret_floor — Combine Floor Turret
  • turret_ceiling — Ceiling Turret
  • turret_ground — Ground Turret
  • combine_camera — Combine Surveillance Camera

NPC Options & Equipment

Spawn NPCs with Weapons

Execute this before spawning an NPC:

bashnpc_create_equipment <weapon_name>

Example: npc_create_equipment weapon_ar2 followed by npc_create npc_citizen.

Rotate NPCs / Turrets

Aim at the NPC/Turret and run:

bashent_rotate 90

Removing NPCs

bashent_remove_all npc_<npc_name>   # Removes all specified NPCs (e.g. ent_remove_all npc_zombie)

Violence & Gore Controls

bashviolence_hblood 0   # Toggle Human Blood (0 = Off, 1 = On)violence_hgibs 0    # Toggle Human Gibs (0 = Off, 1 = On)violence_ablood 0   # Toggle Alien Blood (0 = Off, 1 = On)violence_agibs 0    # Toggle Alien Gibs (0 = Off, 1 = On)

HUD & View Controls

Camera Modes

  • firstperson — Default First-Person perspective
  • thirdperson — Third-Person perspective

Screen Overlays

  • r_screenoverlay effects/combine_binocoverlay.vmt — Combine Binoculars
  • r_screenoverlay effects/tp_eyefx/tp_eyefx.vmt — Vision distortion
  • mat_yuv 1 — Black & White visual filter (mat_yuv 0 to disable)
  • showtriggers_toggle — Show level trigger boxes

HUD Visibility

bashhidehud 0        # Show all HUD elements (Default)hidehud 1 / 2 / 3# Show only Health, Suit Power, & Staminahidehud 4 / 5    # Hide HUD completelycl_drawhud 0     # Alternate command to turn off HUD (1 = On)

World, Gravity & Time Controls

Gravity Control

bashsv_gravity <number>   # Default: 600
  • Lower numbers = Lighter gravity (Moon gravity)
  • Higher numbers = Heavier gravity

Game Speed (Timescale)

bashhost_timescale <number>   # Default: 1.0
  • host_timescale 3.0 — 3x Speed
  • host_timescale 0.5 — Half Speed
  • host_timescale 0.1 — Matrix Slow-Motion

Level Select & Map Commands

Unlock Chapters

bashsv_unlockedchapters <1-15>

Half-Life 2 Map Teleports

Usage: map <map_name>

Chapter 1: Point Insertion

  • intro — Opening intro sequence
  • d1_trainstation_01 — Train Station
  • d1_trainstation_02 — Train Station Plaza
  • d1_trainstation_03 — Station escape

Chapter 2: A Red Letter Day

  • d1_trainstation_05 — Kleiner’s Lab
  • d1_trainstation_06 — Lab exit / Rooftop escape

Chapter 3: Route Kanal

  • d1_canals_01 — Canal entry
  • d1_canals_01a — Canal tunnels
  • d1_canals_02 — Canals checkpoint 2
  • d1_canals_03 — Canals checkpoint 3
  • d1_canals_04 — Canals checkpoint 4
  • d1_canals_05 — Canals checkpoint 5

Chapter 4: Water Hazard

  • d1_canals_06 — Airboat acquisition
  • d1_canals_07 — Water Hazard part 2
  • d1_canals_08 — Water Hazard part 3
  • d1_canals_09 — Water Hazard part 4
  • d1_canals_10 — Water Hazard part 5
  • d1_canals_11 — Water Hazard part 6
  • d1_canals_12 — Water Hazard part 7
  • d1_canals_13 — Gate sequence

Chapter 5: Black Mesa East

  • d1_eli_01 — Exterior of Black Mesa East
  • d1_eli_02 — Eli’s Laboratory

Chapter 6: We Don’t Go To Ravenholm…

  • d1_town_01 — Ravenholm entry
  • d1_town_01a — Town square
  • d1_town_02 — Ravenholm traps
  • d1_town_02a — Graveyard entrance
  • d1_town_03 — Graveyard fight
  • d1_town_04 — Mine shafts
  • d1_town_05 — Mine exit

Chapter 7: Highway 17

  • d2_coast_01 — Pier 12 / Dune Buggy
  • d2_coast_02 — Coastline 1
  • d2_coast_03 — Coastline 2
  • d2_coast_04 — Coastline 3
  • d2_coast_05 — Coastline 4
  • d2_coast_06 — Bridge approach
  • d2_coast_07 — Bridge crossing
  • d2_coast_08 — Bridge interior

Chapter 8: Sandtraps

  • d2_coast_09 — Lighthouse fight
  • d2_coast_10 — Antlion territory
  • d2_coast_11 — Antlion Guard arena
  • d2_coast_12 — Nova Prospekt perimeter
  • d2_prison_01 — Nova Prospekt gates

Chapter 9: Nova Prospekt

  • d2_prison_02 — Nova Prospekt Interior
  • d2_prison_03 — Cellblocks
  • d2_prison_04 — Showers
  • d2_prison_05 — High Security

Chapter 9a: Entanglement

  • d2_prison_06 — Depot entry
  • d2_prison_07 — Turret defense
  • d2_prison_08 — Teleporter room
  • d3_c17_01 — Return to Kleiner’s Lab

Chapter 10: Anticitizen One

  • d3_c17_02 — City 17 uprising
  • d3_c17_03 — Street fighting
  • d3_c17_04 — Barricades
  • d3_c17_05 — Courtyard battle
  • d3_c17_06a — Sewer tunnels 1
  • d3_c17_06b — Sewer tunnels 2
  • d3_c17_07 — Underground plaza
  • d3_c17_08 — Hospital approach

Chapter 11: “Follow Freeman!”

  • d3_c17_09 — Hospital courtyard
  • d3_c17_10a — Hospital interior
  • d3_c17_10b — Roof fight
  • d3_c17_11 — Nexus building
  • d3_c17_12 — Strider battle
  • d3_c17_12b — Ruins
  • d3_c17_13 — Citadel base

Chapter 12: Our Benefactors

  • d3_citadel_01 — Pod ride
  • d3_citadel_02 — Citadel core interior
  • d3_citadel_03 — Upper levels
  • d3_citadel_04 — Power core
  • d3_citadel_05 — Elevator lift

Chapter 13: Dark Energy

  • d3_breen_01 — Breen’s Office / Dark Energy Reactor
  • credits — Game Credits

Episode 1 Maps

Undue Alarm

  • ep1_citadel_00
  • ep1_citadel_01
  • ep1_citadel_02
  • ep1_citadel_02b

Direct Intervention

  • ep1_citadel_03
  • ep1_citadel_04

Lowlife

  • ep1_c17_00
  • ep1_c17_00a

Urban Flight

  • ep1_c17_01
  • ep1_c17_01a
  • ep1_c17_02
  • ep1_c17_02a
  • ep1_c17_02b

Exit 17

  • ep1_c17_05 — Train station intro
  • ep1_c17_06 — Escape sequence
  • ep1_credits — Episode 1 Credits

Suggestion

This article may contain affiliate links. If you use these links to purchase an item we may earn a commission. Thank you for your support.

Photo of author
Biswajit Nayak

Biswajit plays a variety of game genres, earning him the nickname "Spunky" from his friends. He spends most of his time exploring the worlds of Roblox and GTA 5, along with titles like Wuthering Waves and more.

Leave a Reply