FTP Commands for Linux and UNIX

List of commonly used FTP Linux and UNIX platforms commands

Download Free TrialEmail Link to Trial
Fully functional for 14 days
Explore Product Info

FTP definition

FTP is the simplest file transfer protocol to exchange files to and from a remote computer or network. Similar to Windows, Linux and UNIX operating systems also have built-in command-line prompts that can be used as FTP clients to make an FTP connection. Here’s a list of commonly used FTP Linux and UNIX platforms commands.

Download Free TrialLearn More

FTP commands for Linux command prompt

FTP Command
Description of Command
!
Escape to the shell.
$
Execute macro
?
Print local help information.
account
Send account command to remote server.
append
Append to a file.
ascii
Set ascii transfer type.
beep
Beep when command completed.
binary
Set binary transfer type.
bye
Terminate FTP session and exit.
case
Toggle mget upper/lower case id mapping.
cd
Change remote working directory.
cdup
Change remote working directory to parent directory.
chmod
Change file permissions of remote file.
close
Terminate FTP session.
cr
Toggle carriage return stripping on ascii gets.
debug
Toggle/set debugging mode.
delete
Delete remote file
dir
List contents of remote directory.
disconnect
Terminate FTP session.
exit
Terminate FTP sessions and exit.
form
Set file transfer format.
get
Receive file.
glob
Toggle meta character expansion of local file names.
hash
Toggle printing ‘#’ for each buffer transferred.
help
Display local help information.
idle
Get (set) idle timer on remote side.
image
Set binary transfer type.
ipany
Allow use of any address family.
ipv4
Restrict address usage to IPv4.
ipv6
Restrict address usage to IPv6.
lcd
Change local working directory.
ls
List contents of remote directory.
macdef
Define a macro.
mdelete
Delete multiple files.
mdir
List contents of multiple remote directories.
mget
Get multiple files.
mkdir
Make directory on remote machine.
mls
List contents of multiple remote directories.
mode
Set file transfer mode.
modtime
Show last modification time of remote file.
mput
Send multiple files.
newer
Get file if remote file is newer than local file.
nlist
List remote directory nlist contents.
nmap
Set templates for default file name mapping.
ntrans
Set translation table for default file name mapping.
open
Connect to remote ftp.
passive
Enter passive transfer mode.
prompt
Force interactive prompting on multiple commands.
proxy
Issue command on an alternate connection.
put
Send one file.
pwd
Print working directory on remote machine.
qc
Print ? in place of control characters on stdout.
quit
Terminate ftp session and exit.
quote
Send arbitrary ftp command.
recv
Receive file.
reget
Get file restarting at end of local file.
rename
Rename file.
reset
Clear queued command replies.
restart
Restart file transfer at bytecount.
rhelp
Get help from remote server.
rmdir
Remove directory on remote machine.
rstatus
Show status of remote machine.
runique
Toggle store unique for local files.
send
Send one file.
sendport
Toggle use of PORT cmd for each data connection.
site
Send site specific command to remote server.
size
Show size of remote file.
status
Show current status.
struct
Set file transfer structure.
sunique
Toggle store unique on remote machine.
system
Show remote system type.
tenex
Set tenex file transfer type.
tick
Toggle printing byte counter during transfers.
trace
Toggle packet tracing.
type
Set file transfer type.
umask
Get (set) umask on remote site.
user
Send new user information.
verbose
Toggle verbose mode.

FTP command-line options for Linux and UNIX

Command-Line Option
Description of Command
-4
Use only IPv4 to contact any host.
-6
Use IPv6 only.
-e
Disables command editing and history support, if it was compiled into the ftp executable. Otherwise, it does nothing.
-p
Use passive mode for data transfers. Allows the use of ftp in environments where a firewall prevents connections from the outside world back to the client machine. Requires the ftp server to support the PASV command.
-i
Turns off interactive prompting during multiple file transfers.
-n
Restrains ftp from attempting auto-login upon initial connection. If auto-login is enabled, ftp checks the .netrc (see netrc ) file in the user’s home directory for an entry describing an account on the remote machine. If no entry exists, ftp prompts for the remote machine login name (the default is the user identity on the local machine), and, if necessary, prompt for a password and an account with which to login.
-g
Disables file name globbing.
-v
The verbose option forces ftp to show all responses from the remote server, as well as report on data transfer statistics.
-d
Enables debugging.
Download Free TrialLearn More

See also

Secure Linux FTP command file sharing

Download Free TrialEmail Link to Trial
Fully functional for 14 days
Learn More
Let's talk it over.

Contact our team. Anytime.