Goal : To setup TFTP Server in ubuntu and test the same.
Installing TFTP Server in Ubuntu
$ sudo apt-get install tftp tftpd-hpa
Once the setup is done, you can view/edit configuration at
It should look something like,
$ cat /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure"
Starting and stoping the service: We can start and stop tftp service through the following commands.
service tftpd-hpa status service tftpd-hpa stop service tftpd-hpa start service tftpd-hpa restart service tftpd-hpa force-reload
Testing TFTP For testing, we are going to try to download a file from tftp server. For this, we need to copy some file to the location given at TFTP_DIRECTORY variable in /etc/default/tftpd-hpa I took a uImage file to the location.
$ cp uImage /var/lib/tftpboot/
Now, start the tftp client as below,
raj@raj-VirtualBox:~$ tftp localhost tftp>
To check the status, run status command
tftp> status Connected to localhost. Mode: netascii Verbose: off Tracing: off Rexmt-interval: 5 seconds, Max-timeout: 25 seconds tftp>
Now, try to get the file you have copied to the TFTP_DIRECTORY
tftp> get uImage Received 2169792 bytes in 0.3 seconds tftp>
Voila!! You are done.. TFTP is configured and working.