Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reading a book about programming, and I want to check an HTTP response message. The book is instructing me

to telnet into your favorite Web server. Then type in a one-line request message for some object that is housed on the server: for example:

telnet 80

GET /~hello/ HTTP/1.1

What am I supposed to do, exactly? What program do I need? Where do I need to type this message?

share|improve this question

migrated from Feb 18 '11 at 16:19

This question came from our site for professional and enthusiast programmers.

Even though your final intent may be to use the result to guide you in writing some code, this question is entirely about how to use an existing program (telnet), not about programming. – Jerry Coffin Feb 18 '11 at 16:03
How old is that book? Telnet is usually turned off nowdays. – Dennis Williamson Feb 18 '11 at 16:44
@Dennis Williamsom: The telnet service is usually turned off, but he's not using the telnet service, he's using a telnet client to access the http service on port 80. – garyjohn Feb 18 '11 at 17:19

You can use telnet by opening a terminal and running the command you posted above.

If you are a windows user you go to start -> run then type cmd and hit enter. Once it opens you can type in the command and hit enter.

If you are running a Mac OS, some form Linux, or another operating system you would have to find the terminal and run it from there.

You could also use a client such as putty.

Hope that helps.

share|improve this answer
note that in win7+, telnet must be enabled by adding it: it's a windows feature, so you want "turn windows features on/off". (type that in the start menu, or find it in the control panel) – Michael Lowman Feb 19 '11 at 5:27

You need the telnet program, this is included by default in all Windows versions until Vista. If you are on Windows 7 you need to activate telnet.

share|improve this answer

If you are using windows, go to command prompt and type that information. If you are using linux, you should be able to type those commands at command line as well.

Edit for windows: To get to command line, you can click on Start button, click on Run, and type cmd then press enter, or you can hold down windows key (the one with windows logo) and press R, then type in cmd in the new dialog that pops up then press enter.

If you don't want to use built in telnet program, you can go here and download putty, a very powerful telnet client:

share|improve this answer

telnet 80

The above command depicts you connecting your websever through tcp protocol on the port 80 (where your webserver running port) using telnet client service from your machine. Basically telnet client is available in all Windows / Linux machine or you need to enable /install on those OSes.

Telnet server service is another part, where it accepts tcp connection to 22 port (usually), when it is installed on the server machine.

share|improve this answer

You must log in to answer this question.