Portal 2 Console Commands: Full List for PC

Published by

Enable cheats

CheatCommandEffect
Enable cheatsPCsv_cheats 1Turns cheats on; sv_cheats 0 turns them off

God mode and player

CheatCommandEffect
God modePCgodMakes you invincible
Buddha modePCbuddhaYou take damage but cannot die
NoclipPCnoclipFly and pass through walls
NotargetPCnotargetTurrets will not shoot at you
Third-person viewPCthirdpersonSwitches to a third-person view
First-person viewPCfirstpersonSwitches back to first-person view

Portal gun

CheatCommandEffect
Portals anywherePCsv_portal_placement_never_fail 1Lets you place portals on any surface; set it to 0 to turn it off
Upgrade portal gunPCupgrade_portalgunGives a portal gun if you have none, or upgrades a single-portal gun to the full one
Basic portal gunPCgive weapon_portalgunGives the basic portal gun
Potato gunPCupgrade_potatogunGives the portal gun the potato upgrade with GLaDOS
Remove all portalsPCent_fire prop_portal fizzleRemoves every portal on the map

Spawn cubes and gels

CheatCommandEffect
Companion CubePCent_create_portal_companion_cubeCreates a Companion Cube
Reflector cubePCent_create_portal_reflector_cubeCreates a cube that redirects lasers
Weighted cubePCent_create_portal_weighted_cubeCreates a weighted storage cube
TurretPCnpc_create npc_portal_turret_floorSpawns a standing turret
WheatleyPCent_create npc_personality_coreSpawns the Wheatley personality core
Propulsion gelPCent_create_paint_bomb_speedFires propulsion gel
Repulsion gelPCent_create_paint_bomb_jumpFires repulsion gel
Conversion gelPCent_create_paint_bomb_portalFires conversion gel
Erase gelPCent_create_paint_bomb_eraseFires water that clears gel

World and display

CheatCommandEffect
Normal gravityPCsv_gravity 600Sets gravity; 600 is normal, change the number to make it lighter or heavier
Normal game speedPChost_timescale 1Sets game speed; 1 is normal, lower is slower and higher is faster
Show FPSPCcl_showfps 1Shows the frame rate
Show positionPCcl_showpos 1Shows your position, useful for sharing portal spots

Co-op

CheatCommandEffect
Kill AtlasPCkill blueKills Atlas in co-op
Kill P-BodyPCkill redKills P-Body in co-op
Teleport AtlasPCent_teleport blueTeleports Atlas to where you are looking
Teleport P-BodyPCent_teleport redTeleports P-Body to where you are looking

A code here did not work? Tell us and it gets rechecked. Report a code

How to enter cheats in Portal 2

PC

  1. Open Options Keyboard/Mouse and turn on the developer console.
  2. Start a chamber and press ~ to open the console.
  3. Type sv_cheats 1 and press Enter.
  4. Type a command and press Enter.

How to enable developer mode in Portal 2

  1. Right-click the desktop and choose New > Shortcut.
  2. Point it at portal2.exe in quotes, followed by -console.
  3. Start the game from this shortcut; the console opens at the title menu.
  4. Press ~ in game to open or close the console.

GameRevolution: Portal 2 PC cheats

Do cheats disable achievements in Portal 2?

Yes. The Portal Wiki says that with sv_cheats 1 on you cannot earn achievements or submit challenge mode records. Set sv_cheats 0 and restart the map before you go for either. The Portal Wiki: List of useful console commands

Can you use these cheats in multiplayer?

In co-op the host decides. The Portal Wiki says the host controls sv_cheats, so cheat commands only work for both players once the host has turned cheats on. The Portal Wiki: List of useful console commands

Compatibility notes

Which releases these codes apply to, and where one behaves differently. Each note links to the source that documents it.

FAQ

How do you open the console in Portal 2?

Turn on the developer console in Options Keyboard/Mouse, then press the ~ key. You can also launch the game with -console.

Do Portal 2 cheats disable achievements?

Yes. With sv_cheats 1 on you cannot earn achievements or submit challenge mode records.

How do you place portals anywhere in Portal 2?

Type sv_cheats 1, then sv_portal_placement_never_fail 1. Set it back to 0 to turn it off.

How do you spawn a Companion Cube in Portal 2?

With cheats on, type ent_create_portal_companion_cube in the console.

Do console commands work in Portal 2 co-op?

Yes, if the host turns on sv_cheats. The host controls it for both players.

Part of

References: The Portal Wiki: List of useful console commands; GameRevolution: Portal 2 PC cheats; Cyberly: Portal 2 cheats.