TFTP(1) User's Manual TFTP(1)

# [NAME](#NAME)

**tftp** - Trivial File Transfer Protocol (TFTP) client

# [SYNOPSIS](#SYNOPSIS)

**tftp** \[ *options...* ] \[*host* \[*port*]] \[**-c** *command*]

# [DESCRIPTION](#DESCRIPTION)

**tftp** is a client for the Trivial file Transfer Protocol, which can be used to transfer files to and from remote machines, including some very minimalistic, usually embedded, systems. The remote *host* may be specified on the command line, in which case **tftp** uses *host* as the default host for future transfers (see the **connect** command below.)

# [OPTIONS](#OPTIONS)

**-4, --ipv4**

Connect with IPv4 only, even if IPv6 support was compiled in.

**-6, --ipv6**

Connect with IPv6 only, if compiled in.

[**-c**, **--command** *command*](#c)

Execute *command* as if it had been entered on the **tftp** prompt. Must be specified last on the command line.

[**-l**, **--literal**](#l)

Default to literal mode. Used to avoid special processing of “:” in a file name.

[**-m**, **--mode** *mode*](#m)

Set the default transfer mode to *mode*. *mode* can be either **netascii** (convert line endings) or **octet** (direct binary transfer without any conversions.)

This is usually used with -c.

[**-a**, **--ascii**, **--netascii**, **--text**](#a)

Equivalent to “**--mode netascii**”.

[**-b**, **--binary**, **--octet**](#b)

Equivalent to “**--mode octet**”.

[**-B**, **--blocksize** *max-block-size*](#B)

Specifies the maximum permitted block size. The permitted range for this parameter is from 512 to 65464, or it can be specified as “**mtu**”, or “**mtu-slack**”. When **mtu** is specified, **tftp** will try to query the maximum transmission unit (MTU) from the kernel and size the maximum block size accordingly. If *slack* is specified, the MTU value will be adjusted downward by *slack* bytes. **tftp** does not request the option if the block size is set to 512.

The default is **mtu**.

[**-W**, **-w**, **--windowsize** *window-size*](#W)

Request the RFC 7440 **windowsize** option. This permits up to *window-size* data blocks to be sent before an acknowledgment is required. Valid values are 1 through 32768. **tftp** does not request the option if the window size is set to 1.

The default is 64.

[**-T**, **--no-tsize**](#T)

Disable the sending of the RFC 2349 **tsize** (transfer size) option. The default is to send the option.

[**-N**, **--no-options**](#N)

Do not request any TFTP options, for maximum compatibility with old servers. This is equivalent to  
“**--blocksize 512 --windowsize 1 --no-tsize**”.

[**-U**, **--unsafe**](#U)

Allow a TFTP response to come from a different address than the server address to which the request was sent.

Some old TFTP servers have been known to return a response from a network address other than the one to which the request was originally sent. This increases the (already considerable) risk of connection hijacking, and is therefore disallowed by default.

[**-R**, **--port-range** *min-port:max-port*](#R)

Force the originating (local) port number to be in the specified range of port numbers.

[**-v**, **--verbose**\[=*level*\]](#v)

Default to verbose mode. At *level* 2 or higher, do not round byte counts in statistics or use suffixes.

[**-V**, **--version**](#V)

Print the version number and configuration to standard output, then exit gracefully.

[**-h**, **--help** \[*command*\]](#h)

If *command* is specified, print help text for *command* and exit. Otherwise print a command line options summary and exit.

Use **-c help** to get a list of commands available with **-c**.

# [COMMANDS](#COMMANDS)

Once **tftp** is running, it issues the prompt **tftp&gt;** and recognizes the following commands:

**?** *command-name...*

[**help** *command-name...*](#help)

Print help information

[**ascii**](#ascii)

Shorthand for “**mode ascii**”.

[**binary**](#binary)

Shorthand for **mode binary**.

[**connect** *host \[port\]*](#connect)

Set the *host* (and optionally *port*) for transfers. Note that the TFTP protocol, unlike the FTP protocol, does not maintain connections between transfers; thus, the **connect** command does not actually create a connection, but merely remembers what host is to be used for transfers. You do not have to use the **connect** command; the remote host can be specified as part of the **get** or **put** commands.

[**get** *file*](#get)

[**get** *remotefile localfile*](#get~2)

[**get** *file1 file2 file3...*](#get~3)

Get a file or set of files from the specified sources. A remote filename can be in one of two forms: a plain filename on the remote host, if the host has already been specified, or a string of the form *host:filename* to specify both a host and filename at the same time. If the latter form is used, the last hostname specified becomes the default for future transfers. Enable **literal** mode to prevent special treatment of the ':' character (e.g. if the desired filename is “**C:\\dir\\file**”).

[**mget** *file1 file2 ... local-directory*](#mget)

Get one or more files from the specified remote sources into *local-directory*. Each remote filename can be a plain filename on the configured remote host, or a string of the form *host:filename* to specify both a host and filename at the same time. If the latter form is used, the last hostname specified becomes the default for future transfers. Enable **literal** mode to prevent special treatment of the “**:**” character (e.g. if the desired filename is “**C:\\dir\\file**”).

[**literal**](#literal)

Toggle literal mode. When set, this mode prevents special treatment of ':' in filenames.

[**mode** *transfer-mode*](#mode)

Specify the mode for transfers; *transfer-mode* may be one of **netascii** (or **ascii**) or **octet** (or **binary**.) The default is **octet**.

[**blocksize** *block-size*](#blocksize)

Set the requested block size to *block-size*. See the **--blocksize** command-line option.

[**put** *file*](#put)

[**put** *localfile remotefile*](#put~2)

[**put** *file1 file2 file3... remote-directory*](#put~3)

Put a file or set of files to the specified remote file or directory. The destination can be in one of two forms: a filename on the remote host, if the host has already been specified, or a string of the form *host:filename* to specify both a host and filename at the same time. If the latter form is used, the hostname specified becomes the default for future transfers. If the remote-directory form is used, the remote host is assumed to be a UNIX system or another system using **/** as directory separator. Enable **literal** mode to prevent special treatment of the ':' character (e.g. C:\\dir\\file).

[**mput** *file1 file2 ... remote-directory*](#mput)

Put one or more files to *remote-directory*. The destination can be a directory on the configured remote host, or a string of the form *host:directory* to specify both a host and directory at the same time. If the latter form is used, the hostname specified becomes the default for future transfers. The remote host is assumed to use **/** as directory separator. Enable **literal** mode to prevent special treatment of the ':' character (e.g. C:\\dir\\file).

[**quit**](#quit)

Exit **tftp**. End-of-file will also exit.

[**rexmt** *retransmission-timeout*](#rexmt)

Set the initial per-packet retransmission timeout, in seconds. Each subsequent retry doubles this interval.

[**status**](#status)

Show current status.

[**timeout** *total-transmission-timeout*](#timeout)

Set the maximum retransmission interval, in seconds.

[**windowsize** *window-size*](#windowsize)

Request the RFC 7440 **windowsize** option with *window-size* data blocks per window. Valid values are 1 through 32768.

[**tsize**](#tsize)

Toggle sending the RFC 2349 **tsize** (transfer size) option. The default is on, unless the **--no-tsize** command line option was given.

[**options**](#options)

Toggle the sending of TFTP options entirely. The default is enabled, unless the **--no-options** command line option was given. If disabled, TFTP options are never sent; if enabled, TFTP options *may* be sent.

[**trace**](#trace)

Toggle packet tracing (a debugging feature.)

[**verbose**](#verbose)

Toggle verbose mode.

# [NOTES](#NOTES)

The TFTP protocol provides no provisions for authentication or security. Therefore, the remote server will probably implement some kinds of access restriction or firewalling. These access restrictions are likely to be site- and server-specific.

# [AUTHOR](#AUTHOR)

This version of **tftp** is maintained by H. Peter Anvin &lt;hpa@zytor.com&gt;. It was derived from, but has substantially diverged from, an OpenBSD source base, with added patches by Markus Gutschke and Gero Kulhman.

# [SEE ALSO](#SEE_ALSO)

[**tftpd**(8)](/man/enterprise-packages/tftp-hpa/tftpd.8).

20 September 2026 tftp-hpa 7.2

---

Document: tftp(1) from tftp-hpa 7.2-r1 (Chainguard OS)
