How To Install, Configure, and Run Linux Tftp Client? – POFTUT

How To Install, Configure, and Run Linux Tftp Client?


Tftp (Trivial File Transfer Protocol) is a very simple client-server protocol used to transfer data and files over the network. Ftp is a very popular protocol but it has a lot of features that may not be needed always. Tftp is a lightweight alternative to Ftp protocol. We can say that Tftp is a featureless protocol because it only downloads and uploads files.

  • Tftp has no authentication or authorization mechanism.
  • Tftp protocol does not have a file listing feature.
  • Tftp is clear text or not encrypted protocol
  • Tftp is fast and simple to implement
  • TFTP uses generally UDP

Install Tftp

The installation of Tftp tools is as simple as the protocol. As TFTP lightweight there is no dependency for other libraries.

Ubuntu, Debian, Mint, Kali:

We will install tftp for Debian, Mint, Ubuntu and Kali like below.

$ apt install tftp

Fedora, CentOS, RedHat:

We can install tftp with the following command on Fedora, CentOS, RedHat.

$ yum install tftp

tftp Command Syntax

We will use following syntax for tftp command in normal command-line usage.

tftp HOST

tftp Command Help

$ info tftp
Tftp
Tftp

Connect TFTP Server From Command Line

Connecting to the Tftp server is very easy. As stated at the beginning of the post Tftp does not have any authentication and authorization mechanisms. so Just providing the hostname of the server of IP address is enough to connect the Tftp server. In this example, we will connect 192.168.122.239 IP address.

$ tftp 192.168.122.239
Connect
Connect

TFTP Server Command Line Interactive Shell

After connection to the Tftp server, we will get an interactive shell. In this shell, we will issue commands to get information about status of the connection, download or get files, upload, or put files to the server. We can list available commands provided by Tftp shell with ? .

?
Interactive Shell
Interactive Shell

Upload or Put File To The TFTP Server

We can upload or put files to the TFTP server with the put command. In the example, we upload a file named body.txt

put body.txt

Download or Get File From TFTP Server

We can also download or get files from the Tftp server to get command. In the example, we get a file named body.txt from the Tftp server.

get body.txt

Show TFTP Connection Status

As TFTP works generally on the UDP protocol there is no session like TCP. But we can query current connection status with the status command. This status command will provide us information about the connected server IP address, current working mode, Rexmt-interval, Max-timeout, etc.

status
Show Status
Show Status

Disconnect From TFTP Server by Exiting From TFTP Shell

In order to quit from the Tftp shell we need to issue the q command.

Quit From Shell
Quit From Shell

Verbose Mode

While making transfer we may need more information about the transmission. We can get more information about the transfer with the verbose mode.

verbose
Verbose Mode
Verbose Mode

LEARN MORE  Linux pv Command Tutorial With Examples To Monitor Progress Of Copy/Backup/Compress

Leave a Comment