To install and set up a Trivial File Transfer Protocol (TFTP) server on Ubuntu or Debian Linux, follow these steps:
tftpd-hpa
package using the package manager:sudo apt update sudo apt install tftpd-hpa
tftpd-hpa
, runs as the tftp
user. Create a directory for the TFTP server to use as its root directory and set the ownership to the tftp
user:sudo mkdir /tftpboot sudo chown tftp:tftp /tftpboot
/etc/default/tftpd-hpa
file and set the TFTP_DIRECTORY
option to the path of the root directory you created in step 2:TFTP_DIRECTORY="/tftpboot"
tftpd-hpa
daemon:sudo systemctl start tftpd-hpa
/etc/default/tftpd-hpa
file and set the TFTP_ADDRESS
option to the desired IP address. For example:TFTP_ADDRESS="192.168.1.10"
tftpd-hpa
daemon to apply the changes:sudo systemctl restart tftpd-hpa
The TFTP server should now be running and available to clients. To transfer files to or from the TFTP server, you can use a client such as tftp
.