GNU ftp Cheatsheet
#
ftp
is a command-line tool used to transfer files between systems using the File Transfer Protocol (FTP) on GNU systems.
Basic Commands
#
Command/Option | Example | Description |
---|
ftp host | ftp ftp.example.com | Connect to an FTP server |
open host | open ftp.example.com | Connect to an FTP server |
user | user username password | Log in with username and password |
ls | ls | List files in the current directory |
cd | cd /path/to/dir | Change remote directory |
get | get file.txt | Download a file from the server |
put | put file.txt | Upload a file to the server |
mget | mget *.txt | Download multiple files |
mput | mput *.txt | Upload multiple files |
delete | delete file.txt | Delete a file on the server |
mkdir | mkdir newdir | Create a new directory on the server |
rmdir | rmdir olddir | Remove a directory on the server |
bye | bye | Close the connection and exit |
Options
#
Command/Option | Example | Description |
---|
-n | ftp -n | Disable auto-login to the server |
-v | ftp -v | Enable verbose mode for debugging |
Examples
#
Command/Option | Example | Description |
---|
ftp | ftp ftp.example.com | Connect to ftp.example.com |
ls | ls | List files in the current directory on the FTP server |
put file.txt | put file.txt | Upload file.txt to the current remote directory |
This cheatsheet covers essential ftp
commands and options for GNU systems.