Telnet tool: definition, how it works and principal commands

Telnet is a protocol used for emulating a remote terminal. Telnet tool is an implementation of the Telnet protocol, which means that it translates the protocol specifications into a programming language to create a program that can emulate a terminal. It operates in a client/server environment, meaning that the remote machine is configured as a server, and consequently waits for the client to request a service from it. Therefore, since it is sending data to be displayed, the user feels like he/she is working directly on the remote machine. In UNIX, the service is provided by what is called a daemon, a small task that runs in the background. The Telnet daemon is called Telnetd.



Protocols and implementation

Telnet is a protocol: a set of rules and procedures which have been defined in order to standardize Telnet communication. For this reason, Telnet tool has been implemented across numerous platforms, based on the specifications of this protocol.

Running Telnet tool

Telnet can be used in UNIX, Windows and Linux.

The command to initiate a Telnet session is usually:

telnet server_name


server_name represents the name or IP address of the remote machine that the user wants to connect to. You can also give its IP address, for example:

telnet 125.64.124.77


Finally, you can also specify the port number after the IP address or server name:

telnet 125.64.124.77 80

Commands in Telnet

Once you are connected to the remote machine, for security reasons, you will be asked to provide a login and password to keep access restricted to authorized individuals only. Indeed, the reason Telnet is such a powerful protocol is that it allows commands to be run remotely. The commands that can be run in a Telnet session are defined by the network administrator. They tend to be UNIX commands, as most Telnet servers run UNIX. The standard commands are:

Command Description
? help
closeClose Telnet session
displayShow connection settings onscreen (type of terminal & port)
environdefining the operating system's environmental variables
logoutlogging out
modeSwitches between the transfer modes ASCII (transferring a file as text) and BINARY (transferring a file in binary)
openOpens another connection from the current one
quitLeaves the Telnet application
setChanges the connection settings
unset Loads the default connection settings
Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Telnet tool: definition, how it works and principal commands », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!