OS X Terminal – How to Send the Escape Character

macosterminal

Connecting with telnet looks like this:

$ telnet some.host
Trying 10.1.2.3...
Connected to some.host.
Escape character is '^]'.

I'm running this on the OS X Leopard terminal. Question is, how do I send this escape character? On a Linux terminal I'd try ESC5 or CTRL5, but I cannot figure out how to do this on OS X.

Best Answer

The ^] means ctrl + right bracket. As strange as that is, it works. You'll be taken to the telnet prompt, where you can type quit.

On international keyboards the ] character is often not a single key, and needs to be replaced with some other key. The correct key is typically the key to the right of P or the next key after that.

Here's a list based on comments below:

  • Finnish, Swedish, Norwegian, Danish: ctrl + å
  • French: ctrl + 6
  • German: ctrl + ü
  • Swiss: ctrl + ¨
  • Hungarian: ctrl + 5
  • Portuguese: ctrl + ´
  • Dutch, Belgian: ctrl + $
  • Canadian French: ctrl + ç
  • Italian: ctrl + +
Related Question