Trivial File Transfer Protocol (TFTP) is a simple file
transfer protocol that allows a client to retrieve or
transfer files from a server. It is a UDP-based protocol that uses port 69 for
communication. TFTP supports only two transfer modes: "netascii" and
"octet." Netascii mode is used for transferring text files,
while octet mode is used for transferring binary files.
Step 1: Open the terminal and update the package lists for apt
sudo apt update
Enter fullscreen mode
Exit fullscreen mode
Step 2: Install the TFTP server software on the PC that will act as the server using the following command:
sudo apt install tftpd-hpa
Enter fullscreen mode
Exit fullscreen mode
Step 3: Check the status of the TFTP daemon service called "tftpd-hpa" on a Linux system
sudo systemctl status tftpd-hpa
Enter fullscreen mode
Exit fullscreen mode
Step 4 : Open and edit the configuration file for the TFTP daemon service called "tftpd-hpa" on a Linux system
sudo gedit /etc/default/tftpd-hpa
Enter fullscreen mode
Exit fullscreen mode
Step 5 : Make tftp Folder
sudo mkdir /tftp
Enter fullscreen mode
Exit fullscreen mode
Step 6 : Change the ownership of the directory "/tftp" to the user and group "tftp" on a Linux system.
sudo chown tftp:tftp /tftp
Enter fullscreen mode
Exit fullscreen mode
Step 7 : Restart the TFTP daemon service called "tftpd-hpa" on a Linux system.
sudo systemctl restart tftpd-hpa
Enter fullscreen mode
Exit fullscreen mode
Step 1 :
sudo apt install tftp-hpa
Enter fullscreen mode
Exit fullscreen mode
If you got errrors run below commands
sudo lsof /var/lib/dpkg/lock sudo lsof /var/lib/apt/lists/lock sudo lsof /var/cache/apt/archives/lock sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock sudo kill -9Enter fullscreen mode
Exit fullscreen mode
ip a show
Enter fullscreen mode
Exit fullscreen mode
Step 1 : Start a TFTP client session with a TFTP server located at the specified IP address.
sudo tftp >
Enter fullscreen mode
Exit fullscreen mode
Step 2 : Download a file called "server.txt" from a remote TFTP server to the local system.
get server.txt
Enter fullscreen mode
Exit fullscreen mode
Upload a file called "client.txt" from the local system to a remote TFTP server.
put client.txt
Enter fullscreen mode
Exit fullscreen mode
Overall, TFTP is a simple and lightweight protocol that is suitable for transferring small files in a low-security environment. However, it may not be the best choice for transferring sensitive or large files, or for use in high-security environments where data privacy is a concern.