To use these cheat codes first yYou'll have to enter the options menu, select "Controls", then "Advanced". Turn on the option for the console. Press ~ during game play to display the console window and type sv_cheats 1 to enable cheat mode. Now You can enter one of the following codes at the console window to activate the corresponding cheat function. One more thing in addition to these codes, most codes from Half-Life 2 also work in Portal.
sv_cheats 0 - Disable cheat mode.
change_portalgun_linkage_id <0-3> - Allow separate sets of portals to be created.
fire_energy_ball - Fire an energy ball.
upgrade_portalgun - Allow use of second portal placement.
npc_portal_turret_floor - Spawn standing turret.
ent_create_portal_metal_sphere - Spawn Bouncy metal ball.
ent_create_portal_weight_box - Spawn Weighted Storage Cube.
npc_create_aimed npc_rocket_turret - Spawn a rocket turret.
firstperson - First person view.
thirdperson - Third person view.
ch_createairboat - Spawn an airboat.
give weapon_portalgun - Basic portal gun.
ent_fire npc_rocket_turret toggle - Toggle rocket turrets.
ent_fire !picker skin 1 - Turn targeted storage cube into a companion cube.
fire_rocket_projectile - Fire rocket from head (glitched).
impulse 101 - All weapons, including those from Half Life 2.
impulse 200 - Invisible weapon.
god - Invincibility.
buddha - Take damage but cannot die.
sv_gravity - Set gravity; "600" is default.
noclip - No clipping mode.
sv_bonus_map_complete 1 - All challenges completed.
host_timescale <number> - Set game speed; default is "1".
notarget - Turrets do not shoot at you.
sv_portal_placement_never_bump 1 - Portal placement cannot be bumped.
sv_portal_placement_never_fail 1 - Portals can be placed on almost any surface.
npc_create npc_citizen - Spawn citizen.
npc_create npc_breen - Spawn Breen.
npc_create npc_zombie - Spawn zombie.
npc_create npc_fastzombie - Spawn Half-Life 2 "fastzombie".
npc_create npc_poisonzombie - Spawn zombie that tosses Poison Headcrabs from its back.
npc_create npc_headcrab_fast - Spawn fast Headcrab.
npc_create npc_poisonheadcrab - Spawn Poison Headcrab.
npc_create npc_zombine - Spawn "ERROR" character.
npc_create npc_headcrab - Spawn live Headcrab.
npc_create npc_barnacle - Spawn Barnacle.
npc_create npc_combine_s - Spawn Combine soldier.
npc_create npc_gman - Spawn G man with suitcase.
npc_create npc_alyx - Spawn Alyx.
npc_create npc_metropolice - Spawn Metro policeman.
If You complete the indicated task You'll unlock the corresponding accomplishment.
Aperture Science - Earn gold medals on all Portal challenges.
Basic Science - Earn bronze medals on all Portal challenges.
Terminal Velocity - Fall 30,000 feet.
Vanilla Crazy Cake - Beat all six Portal advanced maps.
Camera Shy - Detach security cameras from the walls.
Cupcake - Beat two Portal advanced maps.
Fratricide - Do whatever it takes to survive.
Heartbreaker - Complete Portal.
Lab Rat - Acquire the fully powered Aperture Science Handheld Portal Device.
Long Jump - Jump 300 feet.
Partygoer - Make the correct party escort submission position decision.
Rocket Science - Earn silver medals on all Portal challenges.
Friendly Fire - Knock down a turret with another turret.
Fruitcake - Beat four Portal advanced maps.
Box Head Pictures
On the level where you get the companion cube after you run past the energy balls and are in the room with the three elevators, there are two doors leading to a catcher, and a platform that is pushed out of the wall. Walk up to the platform that is pushed out. Crouch behind it and walk through the opening. On the left hand side are a group of pictures of people with boxes for heads and hearts around them.
Fun with Turrets
You can pick them up, toss them around, make them fall indefinitely through two portals, drop a cube on them, etc. Also try the following. Use the incandescent particle field in front of the exit. The computer voice said before that all objects other than yourself and the portal gun will be destroyed. Pick up a turret and toss it into the energy field. The turret will say "ayayayay" as if being electrocuted and disintegrate.
Glitch - Spawn Huge Error Text
Enter the console then type npc_create npc_zombine or bind "sv_cheats 1; wait; npc_create npc_zombine; wait; wait; sv_cheats 0". Press the bound key if you do not want to get kicked from the server (it will not allow you to earn achievements, etc.
Alternate Title Screen
Successfully complete the game to see the cake title screen.
The graffiti in the game are clues for the ApertureScience.com web site. Go to the site and enter LOGIN as a command. Enter CJOHNSON as a username and TIER3 as a password. After logging in, type HELP for a list of commands.