# Telnet commands

You can use Telnet to access other systems. These Telnet commands will help you do that.

## Start Telnet and establish a connection

Telnet is used from the command line, for example, the command prompt on Windows. Only one command is needed to start the client:

```none
telnet
```

You can also **connect directly** without starting the client first. To do this, either specify the [hostname](https://www.ionos.com/digitalguide/hosting/technical-matters/hostname/) or establish the connection via [IP address](https://www.ionos.com/digitalguide/server/know-how/what-is-an-ip-address/):

```none
telnet <hostname></hostname>
telnet 127.0.0.1
```

You will now be asked to enter the access data and will then be connected.

## Telnet standard commands

The following overview shows the **standard commands**. Some of these can be extended with arguments and executed using the Telnet client:

<table>
  <thead>
    <tr>
      <th>Command</th>
      <th>Short command</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>?/help</td>
      <td>?</td>
      <td>Opens the help menu</td>
    </tr>
    <tr>
      <td>Close</td>
      <td>c</td>
      <td>Closes the current Telnet connection</td>
    </tr>
    <tr>
      <td>display argument</td>
      <td>d</td>
      <td>Displays the various parameters for the current connection (port, terminal type, etc.)</td>
    </tr>
    <tr>
      <td>environ argument</td>
      <td></td>
      <td>Defines the variables for the respective operating system environment</td>
    </tr>
    <tr>
      <td>toggle argument</td>
      <td></td>
      <td>Determines how Telnet reacts to certain situations. The command changes the status from TRUE to FALSE or vice versa; using set or unset, the status can also be set directly ⁠— arguments are thus also valid for set/unset</td>
    </tr>
    <tr>
      <td>Logout</td>
      <td></td>
      <td>Terminates the current Telnet session if the remote host supports the logout option</td>
    </tr>
    <tr>
      <td>mode type</td>
      <td></td>
      <td>Sets the transmission type (text file, binary file)</td>
    </tr>
    <tr>
      <td>open hostname</td>
      <td>o</td>
      <td>Establishes another connection to the selected host in addition to the existing one</td>
    </tr>
    <tr>
      <td>Quit</td>
      <td>q</td>
      <td>Terminates the Telnet client including all active connections</td>
    </tr>
    <tr>
      <td>send argument</td>
      <td>sen</td>
      <td>Sends selected typical Telnet strings to the host</td>
    </tr>
    <tr>
      <td>set argument</td>
      <td>set</td>
      <td>Modifies the connection parameters</td>
    </tr>
    <tr>
      <td>Unset</td>
      <td>u</td>
      <td>Loads the predefined connection parameters</td>
    </tr>
    <tr>
      <td>Status</td>
      <td>st</td>
      <td>Shows whether the connection is active</td>
    </tr>
  </tbody>
</table>

---

### Tip

Since Telnet is operated from the command line, you should also know other commands. Get to know [Windows CMD commands](https://www.ionos.com/digitalguide/server/know-how/windows-cmd-commands/) to easily find your way around the command prompt.

---

## Telnet command options

Some commands can be **extended by arguments**, which means that more options are available to you. Here are some important parameters:

<table>
  <thead>
    <tr>
      <th>Command</th>
      <th>Option</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>telnet</td>
      <td>-d</td>
      <td>Activates debug mode</td>
    </tr>
    <tr>
      <td></td>
      <td>-a</td>
      <td>Attempts automatic login</td>
    </tr>
    <tr>
      <td></td>
      <td>-n tracefile</td>
      <td>Opens tracefile to record appropriate information (see also “set tracefile”)</td>
    </tr>
    <tr>
      <td></td>
      <td>-l user</td>
      <td>If the host supports environ, you will be logged in as the specified user.</td>
    </tr>
    <tr>
      <td></td>
      <td>-e escape char</td>
      <td>Sets an escape character</td>
    </tr>
    <tr>
      <td></td>
      <td>-E</td>
      <td>No character is recognized as escape character</td>
    </tr>
    <tr>
      <td></td>
      <td>-x</td>
      <td>Attempts to activate encryption</td>
    </tr>
    <tr>
      <td>mode</td>
      <td>character</td>
      <td>Disables LINEMODE</td>
    </tr>
    <tr>
      <td></td>
      <td>Line</td>
      <td>Enables LINEMODE</td>
    </tr>
    <tr>
      <td></td>
      <td>isig/-isig</td>
      <td>Enables/disables the TRAPSIG mode of LINEMODE</td>
    </tr>
    <tr>
      <td></td>
      <td>edit/-edit</td>
      <td>Enables/disables the EDIT mode of LINEMODE</td>
    </tr>
    <tr>
      <td></td>
      <td>softtabs/-softtabs</td>
      <td>Enables/disables the SOFT\_TABS mode of LINEMODE</td>
    </tr>
    <tr>
      <td></td>
      <td>litecho/-litecho</td>
      <td>Enables/disables the LIT\_ECHO-Modus of LINEMODE</td>
    </tr>
    <tr>
      <td>send</td>
      <td>abort</td>
      <td>Sends “Abort process” sequence</td>
    </tr>
    <tr>
      <td></td>
      <td>Ao</td>
      <td>Sends “Abort output” sequence; the host flushes the output from itself to the client.</td>
    </tr>
    <tr>
      <td></td>
      <td>ayt</td>
      <td>Sends “Are you there” sequence; the host can confirm with a response.</td>
    </tr>
    <tr>
      <td></td>
      <td>brk</td>
      <td>Sends “Break” sequence</td>
    </tr>
    <tr>
      <td></td>
      <td>ec</td>
      <td>Sends “Erase character” sequence; the host erases the last character entered</td>
    </tr>
    <tr>
      <td></td>
      <td>el</td>
      <td>Sends Erase line sequence; the host erases the line that is being entered</td>
    </tr>
    <tr>
      <td></td>
      <td>eof</td>
      <td>Sends “End of file” sequence</td>
    </tr>
    <tr>
      <td></td>
      <td>eor</td>
      <td>Sends “End of record” sequence</td>
    </tr>
    <tr>
      <td></td>
      <td>esc</td>
      <td>Sends the current escape character (see also “telnet -e”)</td>
    </tr>
    <tr>
      <td></td>
      <td>ga</td>
      <td>Sends “Go ahead” sequence</td>
    </tr>
    <tr>
      <td></td>
      <td>getstatus</td>
      <td>Requests the host to discard any input that has not yet been processed</td>
    </tr>
    <tr>
      <td></td>
      <td>?</td>
      <td>Provides information about the send command</td>
    </tr>
    <tr>
      <td>set/unset</td>
      <td>echo value</td>
      <td>Determines whether characters entered should also be displayed</td>
    </tr>
    <tr>
      <td>(value can be TRUE/FALSE or a special character)</td>
      <td>eof value</td>
      <td>Enables the “End of file” character (see also “send eof”)</td>
    </tr>
    <tr>
      <td></td>
      <td>erase value</td>
      <td>Enables erase character (see also “send ec”); works only in localchars mode (see also “toggle localchars”)</td>
    </tr>
    <tr>
      <td></td>
      <td>escape value</td>
      <td>Enables escape character (see also “telnet -e”)</td>
    </tr>
    <tr>
      <td></td>
      <td>flushoutput value</td>
      <td>Enables abort output character (see also “send ao”); works only in localchars mode (see also “toggle localchars”)</td>
    </tr>
    <tr>
      <td></td>
      <td>lnext value</td>
      <td>Enables “lnext” characters</td>
    </tr>
    <tr>
      <td></td>
      <td>quit value</td>
      <td>Enables “break” characters (see also “send brk”); works only in localchars mode (see also toggle localchars)</td>
    </tr>
    <tr>
      <td></td>
      <td>reprint value</td>
      <td>Enables “reprint” character</td>
    </tr>
    <tr>
      <td></td>
      <td>start value</td>
      <td>Enables “start” character; only if TOGGLE-FLOW-CONTROL is enabled</td>
    </tr>
    <tr>
      <td></td>
      <td>stop value</td>
      <td>Activates “stop” character; only if TOGGLE-FLOW-CONTROL is activated</td>
    </tr>
    <tr>
      <td></td>
      <td>worderase value</td>
      <td>Enables “worderase” characters</td>
    </tr>
    <tr>
      <td>environ</td>
      <td>define variable value</td>
      <td>Assigns a value to a variable; values can be enclosed in single or double quotes.</td>
    </tr>
    <tr>
      <td></td>
      <td>undefine variable</td>
      <td>Deletes the specified variable</td>
    </tr>
    <tr>
      <td></td>
      <td>export variable</td>
      <td>Exports the specified variable</td>
    </tr>
    <tr>
      <td></td>
      <td>unexport variable</td>
      <td>Specifies that the specified variable may only be exported when Telnet is specifically requested to do so</td>
    </tr>
    <tr>
      <td></td>
      <td>list</td>
      <td>Lists all variables; \* character indicates whether the variable is exported automatically.</td>
    </tr>
    <tr>
      <td></td>
      <td>?</td>
      <td>Provides information about the send command</td>
    </tr>
    <tr>
      <td>toggle</td>
      <td>autosynch</td>
      <td>If both autosynch and localchars are active, an additional “synch” sequence is sent when the quit character is sent (see also “set quit”)</td>
    </tr>
    <tr>
      <td>(Initial state is TRUE)</td>
      <td>binary</td>
      <td>Enables/disables “binary” option on input and output</td>
    </tr>
    <tr>
      <td></td>
      <td>inbinary</td>
      <td>Enables/disables “binary” option at input</td>
    </tr>
    <tr>
      <td></td>
      <td>outbinary</td>
      <td>Enables/disables binary option on output</td>
    </tr>
    <tr>
      <td></td>
      <td>crlf</td>
      <td>TRUE: carriage return is set to &lt;CR&gt;&lt;LF&gt;</td>
    </tr>
    <tr>
      <td></td>
      <td>crmod</td>
      <td>FALSE: carriage return is set to &lt;CR&gt;&lt;NUL&gt; (FALSE is the normal state here)</td>
    </tr>
    <tr>
      <td></td>
      <td>debug</td>
      <td>Switches the state of the “carriage return” mode</td>
    </tr>
    <tr>
      <td></td>
      <td>localchars</td>
      <td>Switches the state of the “Socket debug” mode (FALSE is the normal state here)</td>
    </tr>
  </tbody>
</table>

For more Telnet commands and options, as well as detailed documentation, check out the [Telnet Man Page](https://docs.oracle.com/cd/E86824_01/html/E54763/telnet-1.html "Man Page at Oracle").

---

### Tip

If you don’t really know the remote protocol yet, it’s worth taking a look at our detailed article on the subject ⁠— [telnet](https://www.ionos.com/digitalguide/server/tools/telnet-the-system-wide-remote-protocol/). The article also explains how to enable Telnet in Windows.

---


This is a markdown version of: [https://www.ionos.com/digitalguide/server/tools/telnet-commands/](https://www.ionos.com/digitalguide/server/tools/telnet-commands/) for AI/LLM consumption.