FTP Commands for Linux and UNIX

List of commonly used FTP Linux and UNIX platforms commands

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.

FTP commands for Linux command prompt

FTP Command Description of Command
!Escape to the shell.
$Execute macro
?Print local help information.
accountSend account command to remote server.
appendAppend to a file.
asciiSet ascii transfer type.
beepBeep when command completed.
binarySet binary transfer type.
byeTerminate FTP session and exit.
caseToggle mget upper/lower case id mapping.
cdChange remote working directory.
cdupChange remote working directory to parent directory.
chmodChange file permissions of remote file.
closeTerminate FTP session.
crToggle carriage return stripping on ascii gets.
debugToggle/set debugging mode.
deleteDelete remote file
dirList contents of remote directory.
disconnectTerminate FTP session.
exitTerminate FTP sessions and exit.
formSet file transfer format.
getReceive file.
globToggle meta character expansion of local file names.
hashToggle printing ‘#’ for each buffer transferred.
helpDisplay local help information.
idleGet (set) idle timer on remote side.
imageSet binary transfer type.
ipanyAllow use of any address family.
ipv4Restrict address usage to IPv4.
ipv6Restrict address usage to IPv6.
lcdChange local working directory.
lsList contents of remote directory.
macdefDefine a macro.
mdeleteDelete multiple files.
mdirList contents of multiple remote directories.
mgetGet multiple files.
mkdirMake directory on remote machine.
mlsList contents of multiple remote directories.
modeSet file transfer mode.
modtimeShow last modification time of remote file.
mputSend multiple files.
newerGet file if remote file is newer than local file.
nlistList remote directory nlist contents.
nmapSet templates for default file name mapping.
ntransSet translation table for default file name mapping.
openConnect to remote ftp.
passiveEnter passive transfer mode.
promptForce interactive prompting on multiple commands.
proxyIssue command on an alternate connection.
putSend one file.
pwdPrint working directory on remote machine.
qcPrint ? in place of control characters on stdout.
quitTerminate ftp session and exit.
quoteSend arbitrary ftp command.
recvReceive file.
regetGet file restarting at end of local file.
renameRename file.
resetClear queued command replies.
restartRestart file transfer at bytecount.
rhelpGet help from remote server.
rmdirRemove directory on remote machine.
rstatusShow status of remote machine.
runiqueToggle store unique for local files.
sendSend one file.
sendportToggle use of PORT cmd for each data connection.
siteSend site specific command to remote server.
sizeShow size of remote file.
statusShow current status.
structSet file transfer structure.
suniqueToggle store unique on remote machine.
systemShow remote system type.
tenexSet tenex file transfer type.
tickToggle printing byte counter during transfers.
traceToggle packet tracing.
typeSet file transfer type.
umaskGet (set) umask on remote site.
userSend new user information.
verboseToggle verbose mode.

FTP command-line options for Linux and UNIX

Command-Line Option Description of Command
-4Use only IPv4 to contact any host.
-6Use IPv6 only.
-eDisables command editing and history support, if it was compiled into the ftp executable. Otherwise, it does nothing.
-pUse 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.
-iTurns off interactive prompting during multiple file transfers.
-nRestrains 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.
-gDisables file name globbing.
-vThe verbose option forces ftp to show all responses from the remote server, as well as report on data transfer statistics.
-dEnables debugging.

Secure Linux FTP command file sharing

Starts at

Supports unlimited concurrent sessions

Let’s talk it over.

Contact our team. Anytime.