Split-screen PC/Mac play is not supported by Valve via obvious in-game menus.
The only way in which you can play co-op Portal 2 with a single Portal 2 purchase in a way that is obviously supported by the game manufacturer is by purchasing the PS3 copy:
Only PlayStation®3 split-screen co-op can be played using a single copy of the game.
When you purchase a new copy of Portal 2 for PlayStation®3, you will receive an in-box code which provides your linked Steam account with access to your copy of Portal 2 on your computer.
The game is still owned by only a single Steam account--another copy will be required to play online co-op with a friend.
( source )
It has been noted in the other answers that the act of single-system split-screen is possible.
It required modifying configuration files and a workaround to force the game to move a controller to the second player slot.
Valve has neither stated that this method is supported or banned.
Steam Support indicates it's not supported, but also openly admits it's an option that currently exists.
Hello Shaun, Thank you for contacting Steam Support.
Split-screen mode is available in the Xbox 360 and Playstation 3 versions of this game only.
However, split-screen options may be available using the methods found here:
http://forums.steampowered.com/forums/showthread.php?t=1847904 Note: These methods are not supported, as split-screen is not an intended feature of the PC/Mac version of Portal 2.If you have any further questions, please let us know - we will be happy to assist you.
gaming.stackexchange.com/users/3107/Shaun
According to this article and this steam forum thread , it's possible to set up a split-screen co-op in Portal 2 on the PC and many have gotten it to work.
In fact, it can be done by setting up (or emulating)
an XBox 360 USB controller using Joystick ID #2.
The original Steam forum post seems to work for many people, but not in all circumstances.
The post is managed by one person and there seem to be conflicting statements on it.
There are a lot of off-shoot threads in the wild with many different solutions, but none that seem to work in all cases (at least not that we can prove by voting).
It seems that the only sure bet solution is to buy and plug in an xbox 360 game USB controller and use JoyIDs to set the controller to ID #2.
Note that while this is 'unsupported' by Valve, it's IN NO WAY discouraged or illegal to do so.
In fact, Valve has traditionally been extremely supportive of game modding and console tweaking.
gaming.stackexchange.com/users/6424/Matias Nino
This feature is now available using a method significantly easier than the answers from 2011 suggest.
You will need at least once XInput (XBox 360 compatible) controller.
Two controllers (officially supported) On the main menu, select Play cooperative game Have the second player press X on their controller Woosh!
Keyboard / Mouse and a controller On the main menu, click Options Click Keyboard/Mouse Toggle Allow developer console to Enabled Press
the ~ key (usually near the esc key) to open the console Type joy_remap_player_for_controller1 2
The controller is now player 2.
Press
the ~ key to close the console Follow the previous instructions for two controllers.
If you later want to use a controller in the single player game, follow the instructions again, but type joy_remap_player_for_controller1 1 instead.
Note that there is a caveat; all levels will be unlocked from the start .
gaming.stackexchange.com/users/217/JamesGecko
On OSX and Linux, joy_remap_player_for_controller1 1 is not a valid command.
There is, however a workaround.
In short, you exploit a bug in the command that allows you to test coop maps with a single player ( in_forceuser ).
Here's how: Make sure your controller is connected (important on OSX at least.
Plugging the controller after the game is launched does not work for me) Launch Portal 2 Open the console Start a coop map: ss_map mp_coop_start Run the following two commands: sv_cheats 1 then in_forceuser 1 Your gamepad will continue to control player 1, while the keyboard/mouse will now control player 2!
Thanks to Sharft 6 for figuring this out on Ubuntu.
gaming.stackexchange.com/users/87993/johnboiles
I don't think you can use a second keyboard and mouse, but a gamepad should do it.
You need only one copy of the game and you should be familiar with the ingame console and config files.
Take a look at this thread on the steam forums:
How-to:
Split Screen Coop
gaming.stackexchange.com/users/7660/red
Is there a way to play Portal 2 co-op on a single PC or Mac?  If so, do we need two keyboards, or two mice, or what?  Do we need to buy two copies of the game?  Note: The  wireless  XBox 360 controller does not work standalone out of the box on either an iMac or Windows 7 PC.  It needs a receiver as well.  I thought it would be Bluetooth, but no.
Can we play Portal 2 co-op on one PC or Mac?
gaming.stackexchange.com
<portal-2>
gaming.stackexchange.com/questions/20769
gaming.stackexchange.com/users/5612/Thomas L Holaday
You can purchase the PS3 copy with the split-screen co-op. You can also plug in an xbox 360 game USB controller. Buying the PS3 copy of Portal 2 or using an Xbox 360 USB controller are the prefered choices.
Plugging the controller after the game is launched does not work for me) Launch Portal 2 Open the console Start a coop map: ss_map mp_coop_start Run the following two commands: sv_cheats 1 then in_forceuser 1 Your gamepad will continue to control player 1, while the keyboard/mouse will now control player 2! Here's how: Make sure your controller is connected (important on OSX at least.
A suggested solution is buying the PS3 copy. An Xbox 360 USB controller seems to be a successful option.