Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am going to put a new ROM file on a network attached instrument and I need to use tftp. Does anyone know how to do this?

I am going to upload two different files and they will go into separate folders.

share|improve this question
up vote 5 down vote accepted

It is probably best to use the TFTP server (or "service" in MS parlance) that is "native" to the operating system distribution on which you wish to run the TFTP server.

If you are using Ubuntu, try this article by David Sudjiman.

If you are using Debian, try this Nixcraft article.

If you are using CentOS, RHEL or Fedora try this blog post.

If you are using MS Windows, try TFTPD32. This isn't a "native" server in the sense of being in the Windows distribution, but it is a commonly used TFTP server.

If the device that you are attaching to the network is itself a TFTP server and you need to upload a file to that server using a TFTP client, then you need to find out

  1. The IP address of the device
  2. The file name that the device is expecting to receive

You might also need the port number on which the devices TFPT server is listening if it is not the TFTP well-known (standard) port, port 69.

If the device configures itself using DHCP from a server on your network then you can look at the DHCP service log files to see what its IP address is. Another possibility is that the device configures an ad-hoc IP network. So you need to have some documentation about the device to know how it configures itself.

Most of the above mentioned TFTP server packages also install TFTP clients. If you don't want to install the servers then some distribution have stand-alone TFPT clients, but they are usually not installed as part of the standard installation so you will have to install them manually.

Once you know the IP address of the device and the name of the file that it is expecting to receive, you should be able to upload the file to the device by using a command like

tftp -c put myfile theirfile

Since the tftp default transfer mode is ASCII and you are uploading a ROM, the command should probably be

tftp -m binary -c put myfile theirfile

Where "myfile" is the name of the file you wish to upload and "theirfile" is the name that the file should have on the device. You might also want to use the "-v" command parameter so that if something goes wrong you can see what it was:

tftp -v -c put myfile theirfile

If the server is running on another port, say 8069, then the command syntax would be

tftp -v 8069 -c put myfile theirfile

If the local file already has the correct name, then the command is simply

tftp -v -c put myfile
share|improve this answer
I don't have access to the TFTP server since it is running on an external instrument that is attached to the network. I need to find out how to use the tftp client in Linux so that I can access the tftp server on the instrument. Or is that what you meant? – user1728363 Apr 12 '13 at 7:57
I tried this command: tftp -v -c put myfile theirfile with my settings and files. I got the response Error Code 2 Wrong file type. I realized this was because I had to transfer it binary. So I did tftp followed with the binary command and then put myfile theirfile. – user1728363 Apr 12 '13 at 9:05
@user1728363 I added a line to the answer that shows the syntax of the tftp command with the "-m binary" parameter. Please take a look. – Jonathan Ben-Avraham Apr 12 '13 at 9:16

You need to know the port the TFTP server is listening in. Usually it is

# getent services tftp

tftp                  69/tcp

A client for GNU/Linux:

$ yum info tftp

Available Packages
Name        : tftp
Arch        : x86_64
Version     : 0.49
Release     : 7.el6
Size        : 32 k
Repo        : base
Summary     : The client for the Trivial File Transfer Protocol (TFTP)
URL         :
License     : BSD
            : The Trivial File Transfer Protocol (TFTP) is normally used
            : only for booting diskless workstations.  The tftp package
            : provides the user interface for TFTP, which allows users to
            : transfer files to and from a remote machine.  This program
            : and TFTP provide very little security, and should not be
            : enabled unless it is expressly needed.

For instructions on how to upload files, check the tftp(1) manpage, specifically the put command.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .