FTP server is widely used in setup which involves frequent transfer of files. Although multiple GUI based FTP clients are available but still you may need connect FTP server from Linux terminal on Server environment without GUI.
Contents – connect to FTP server from Linux Terminal
- FTP commands to perform connection to server, Listing files Download and Upload files in FTP server
FTP commands to perform connection to server, Listing files Download and Upload files in FTP server
Before starting you need a configured working FTP server.
To connect to remote FTP server you will need
- IP address of FTP server and port for Server default is 21
- User name for FTP account
- Password for FTP user
Connect FTP Server from Linux terminal
In terminal type
ftp server name or IP address
If domain name is different than default type server name / ip address followed by :portnumber (192.168.0.112:200)
Once you are connected to ftp server, it will ask for username and password, enter them as asked.
Transfer files from / to FTP server
Listing files on FTP Server from Linux terminal
Once connected check files available. To check you need to use list (ls) command.
Changing Directories on FTP Server from Linux terminal
Changing directories on server is simple just use cd command
cd <directory name>
Downloading files from FTP Server using Linux terminal
Downloading files from remote ftp server requires to things – first you need to set up local download path and downloading files
to set local path use command lcd
If you have started ftp session from local directory into which you want to copy file, you can skip this step.
Finally to download file type
Uploading files to FTP Server from Linux terminal
To upload files to remote ftp server you need to use command
similiar to downloading files you can change local directroy by using lcd command.
Disconnecting FTP connection made from Linux terminal
To disconnect working FTP session you can use bye/exit/quit command.
Other articles which will interest you