Linux / UNIX FTP Commands Tutorial
File Transfer Protocol (FTP) is a commonly used protocol for transferring files between a client and a server over a network. FTP is available on most Unix and Linux systems, and provides a simple way to transfer files to and from a remote server.
Here's a tutorial on some common FTP commands:
- Connect to an FTP server: To connect to an FTP server, use the following command:
ftp server.example.comReplace
server.example.comwith the hostname or IP address of the FTP server you want to connect to. - Log in: After connecting to the FTP server, you will be prompted to log in. Use the following command to log in:
login username passwordReplace
usernameandpasswordwith your FTP login credentials. - List directory contents: To see a list of the files and directories in the current directory, use the following command:
ls - Change directories: To change to a different directory on the FTP server, use the following command:
cd directoryReplace
directorywith the name of the directory you want to change to. - Upload a file: To upload a file to the FTP server, use the following command:
put local_file.txtReplace
local_file.txtwith the name of the file you want to upload. - Download a file: To download a file from the FTP server, use the following command:
get remote_file.txtReplace
remote_file.txtwith the name of the file you want to download. - Quit FTP: To exit the FTP client, use the following command:
quit
