Make TF2 connect to a particular server when launched from command line

team-fortress-2

I need some help with starting TF2 using the command prompt and having it connect to a server. Something like the external protocol request when you click "Join Game" on the Steam community website.

I know how to start TF2 from the command prompt, but how do I have it connect to a server?

Best Answer

To launch TF2 via command prompt and have it connect to a particular server, you need to add +connect ip:port to your command after the path to the executable. You can replace the path to the game's executable with a path to Steam's executable followed by -applaunch 440.