tftp - Provides the Trivial File Transfer Protocol (TFTP)
The tftp command transfers files between hosts using TFTP. Because TFTP is a minimal file transfer protocol, the tftp command does not provide all of the features described under the ftp command. For example, tftp does not provide subcommands to list remote files or change directories at the remote host, and limited file access privileges are given to the remote TFTP server. Note that the tftp command is not available when your host is operating in controlled access (secure) mode.
The remote host must have a tftpd server started by its inetd server and have an account defined that limits the access of tftpd. Use the tftpd command to set up the TFTP environment and the nobody account.
The tftp command has two forms: interactive form and command line form. In the interactive form, tftp is issued alone or with a host argument that specifies the default host to use for file transfers during this session. You can also specify a port for the tftp connection to use. When you enter the interactive form, the tftp> prompt appears. In the command line form, you specify command arguments on the command line, and no prompt appears. The tftp command can overwrite a file, but prompts you before doing so.
When transferring data to a remote host, the transferred data is placed
in the directory specified by the
must be a fully specified filename, and the remote
file must both exist and have write permission set for others. The
command attempts to write the data to the specified file.
However, if the remote TFTP server does not have the appropriate privileges
to write the remote file or if the file does not already exist, the transfer
The tftp subcommands can be entered in either their interactive form or in their command line form. Displays help information. If a subcommand is specified, only information about that subcommand is displayed. Synonym for the mode ascii subcommand. Synonym for the mode binary subcommand. This subcommand is used in the interactive mode. The image mode is the same as mode binary, but is used on the command line. Sets the remote host, and optionally the port, for file transfers. Because the TFTP protocol does not maintain connections between transfers, the connect subcommand does not create a connection to host, but stores the settings for transfer operations. Because the remote host can be specified as part of the get or put subcommands, which overrides any host previously specified, the connect subcommand is not required. Transfers a file or set of files from the remote host to the local host. Each of the remote_file arguments can be specified in one of the following two ways: As a file that exists on the remote host, if a default host was already specified. As host:file, where host is the remote host and file is the name of the file to copy to the local system. If this form of the argument is used, the last host specified becomes the default host for later transfers in this tftp session.
To enter tftp, check the current status, connect to host1, and transfer the file update from host1 to the local host, enter: $ tftp tftp> status
Mode: netascii Verbose: off Tracing: off
Rexmt_interval: 5 seconds, Max-timeout: 25 seconds
tftp> connect host1 tftp> get /u/alice/update update
subcommand transfers the file
from the remote host to your local host. Note that directory
on the remote host must have
read permission set for others.
Defines the address of the local host, and specifies the names
and addresses of remote hosts.
Defines the sockets and protocols used for Internet services.
Commands: ftp(1), ftpd(8), inetd(8), rcp(1), syslogd(8), tftpd(8)