OpenSUSE Leap 15: Install tftp for TFTP server

This article will describe installing tftp for TFTP server.

1 Install tftp

Install tftp package. /srv/tftpboot is used for TFTP server directory.

> sudo zypper -n in tftp
> sudo systemctl enable tftp.socket
> sudo systemctl start tftp.socket
> sudo firewall-cmd --add-service=tftp --permanent
> sudo firewall-cmd --reload

2 GET file with tftp

Put file to /srv/tftpboot.

> echo "hello" | sudo tee /srv/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