Ubuntu 16.04: TFTPサーバのatftpdをインストールする


Table of Contents

1 atftpdをインストールする

atftpdパッケージをインストールします。inetdを使用せずにsystemdでサービスを起動します。デフォルトで/srv/tftpがTFTPサーバのディレクトリとして使われます。

$ sudo apt install -y atftpd$ sudo sed -e ‘s/^USE_INETD=true/USE_INETD=false/g’ -i /etc/default/atftpd$ sudo systemctl enable atftpd$ sudo systemctl restart atftpd

2 atftpでファイルをGETする

atftpパッケージをインストールします。

$ sudo apt install -y atftp

TFTPサーバにファイルを置きます。

$ echo “hello” | sudo tee /srv/tftp/hello.txt

TFTPクライアントのatftpでTFTPサーバからファイルをGETします。

$ echo “get hello.txt” | atftp 127.0.0.1tftp> get hello.txttftp>$ cat hello.txthello

Android | Linux | SDL - Narrow Escape