AlpineLinux 3.7: Install tftp-hpa for TFTP server

This article will describe installing tftp-hpa for TFTP server.

1 Install tftp-hpa

Install tftp-hpa package. /var/tftpboot is used for TFTP server directory.

$ sudo apk add tftp-hpa
$ sudo rc-update add in.tftpd
$ sudo rc-service in.tftpd start

2 GET file with tftp

Put file to /var/tftpboot.

$ echo "hello" | sudo tee /var/tftpboot/hello.txt

Get file with tftp from TFTP server.

$ echo "get hello.txt" | tftp 127.0.0.1
tftp> get hello.txt
tftp>
$ cat hello.txt
hello