Menu Close

Setting Up a TFTP Server in Ubuntu Linux

This article talks about the commands and steps needed to set up a TFTP server in Ubuntu Linux.

For more on this subject, please refer to the SOC Table of Contents.

 

TFTP is a simple file transfer system widely used in embedded development. It will also be needed when dealing with PetaLinux. First, we will have to install tftp-hpa as well as tftpd-hpa. The command is as follows:

sudo apt-get install tftp-hpa tftpd-hpa

TFTP requires a folder in order to store files. We can create a folder named tftp in the root directory, which would have the directory of /tftpboot. This is because PetaLinux defaults to this directory, thus making our lives easier in the future when everything is installed. The commands are as follows:

sudo mkdir -p /tftpboot
sudo chmod 777 /tftpboot

Note how we used 777 in the second command, which gives it permissions to read, write, and execute for all users; we want to help set up the permissions for the tftpboot folder for future usage.

Finally, we will go on to configure tftp. We can create and open /etc/default/tftpd-hpa by using the following command:

vi /etc/default/tftpd-hpa 

We will proceed to fill it out as follows:

# /etc/default/tftpd-hpa
TFTP_USERNAME=“tftp”
TFTP_DIRECTORY=“/tftpboot”
TFTP_ADDRESS=“/tftpboot”
TFTP_OPTIONS=“-l -c -s”

Finally, we will enter the following command to restart the tftp server, and thus finish building it.

sudo apt-get install nfs-kernel-server
Posted in Textbook and Training Project

Related Articles

Leave a Reply

Your email address will not be published.

Leave the field below empty!