# TFTP 服务安装和配置 ## 安装 ```bash # Ubuntu sudo apt-get install tftpd-hpa # Manjaro sudo pacman -S tftp-hpa ``` ## 配置 ```bash # Ubuntu sudo vim /etc/default/tftpd-hpa # Manjaro sudo vim /etc/conf.d/tftpd ``` Ubuntu 系统修改为如下内容: ```ini TFTP_USERNAME="tftp" TFTP_DIRECTORY="" TFTP_ADDRESS=":69" TFTP_OPTIONS="-l -c -s" #TFTP_OPTIONS="--secure" ``` Manjaro 系统修改为如下内容: ```ini TFTPD_ARGS="-l -c -s /home/rick/Share/tftp" ``` ## 使能/启动 TFTP 服务 ```bash # Ubuntu sudo systemctl enable tftp-hpa sudo systemctl start tftp-hpa # Manjaro sudo systemctl enable tftpd sudo systemctl start tftpd ``` ## 停止/禁用 TFTP 服务 ```bash # Ubuntu sudo systemctl stop tftp-hpa sudo systemctl disable tftp-hpa # Manjaro sudo systemctl stop tftpd sudo systemctl disable tftpd ```