PDF download Download Article
Quit telnet and go back to your command line instantly
PDF download Download Article

This wikiHow teaches you how to exit a telnet session on your Windows, Mac, or Linux computer.

Quick Steps

  1. Press Ctrl + ] on your keyboard.
  2. Type "close".
  3. Press Enter or Return to close the connection.
  1. Whether you're using telnet on Windows, macOS , or Linux, pressing Ctrl + ] when connected to a server via telnet brings you back to the telnet> prompt.
  2. Alternatively, you can type quit or q —any of these three commands will work.
    Advertisement
  3. This exits telnet and returns you to the prompt in Command Prompt or Terminal.
    • If you tried to telnet to a host and the connection is hanging, you may just see ^] on the screen when you press Ctrl + ] . In this case, you can either wait for the connection to time out, or exit telnet by closing the Command Prompt or Terminal window.
  4. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Video

      Tips

      • While telnet used to be one of the most common ways to connect to servers remotely, most servers no longer accept telnet connections on most ports. These days, people mostly use telnet to test open ports, though tools like Netcat and Nmap are becoming more common. [1]
      • Telnet no longer comes preinstalled on Windows or macOS. To remotely connect to a Unix server, use ssh instead. [2]
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 63,270 times.

      Is this article up to date?

      Advertisement