![]() ❸ Provide your password and press ENTER again. ❷ Write the following command to start an FTP session and hit ENTER: ftp ❶ Open an Ubuntu Terminal on your client computer. To quit an FTP session, you need to type the word “ exit”. Here I will show how to quit an FTP session because you will be doing it a lot. ASCII mode is also available, which transfers files in ASCII text. Note: Binary mode means files will be transferred in binary data. So you are ready to execute any FTP command. Now you can see the “ ” is replaced with “ ftp>”. Finally, it will show you “ Login successful”. Then it will tell you to specify a password. ❸ Provide password associated with the username.Īt first, you will see the “ connected to 192.168.0.104” message. ❷ Copy the following command in the command prompt and press ENTER: ftp ❶ Launch an Ubuntu Terminal on your client computer. Now do the following to connect to an FTP server: For instance, my username is walid and IP address is 192.168.0.104. Here I will show how to connect to a FTP server using a username and IP address. Example 1: Connect to an FTP Server Using the “ftp” Command in Linuxįirst of all, if you want to do anything on an FTP server using the ftp command in Linux, you need to connect to it. In this section, I will show you multiple examples of the ftp command in Linux. Practical Examples of the “ftp” Command in Linux ![]() Now you are ready to access your server with an IP address. You may notice there are two inet, use the first one. You will get an IP address like below followed by inet. Note: If this tool isn’t installed on your server, execute the following command: And the next two lines will make the server use a port in the range of 40000 to 60000 in the passive mode for data transformation. The “ write_enable=YES” line will allow uploading to the FTP server. ❹ Add the following three lines in the nf file, press CTRL+O, followed by CTRL+X to save and exit: write_enable=YES ❸ Insert the following command to open the nf file and hit ENTER. The package will be installed within a very short time. ❷ Copy the following command in the Terminal to install “ vsftpd” package and press ENTER: sudo apt-get install vsftpd ❶ At first, launch an Ubuntu Terminal on the server computer. This section I will show you how to set up an FTP server. In addition, I have used Ubuntu in VMWare Workstation Pro as the server. Moreover, I installed Windows Terminal to customize the appearance of the Terminal. The Terminal of the client computer goes like. I have used Ubuntu on WSL( Windows Subsystem for Linux) as the client computer. To use the ftp command in Linux, you must first have a client and a server computer. Using a different case will execute different tasks or generate an error. Note: The options in Linux CLI (Command Line Interface) are all case-sensitive, So be careful using them. The syntax of the ftp command goes like the following: ftp. You can provide multiple options for the ftp command in Linux. For your information, the ftp command uses port 21 to communicate and port 20 to transfer files by default. In addition, accessing a new port by a client or server makes data transformation in the ftp command in Linux more secure. Passive mode is more firewall-friendly and less likely to have a connection blocked by a firewall. However, in the passive mode, the port number is decided by the server. In active mode, the client computer initiates data connection by sending the server a port number and then the file transformation is done through that port. Nowadays, the ftp command in Linux uses two modes to transfer files, active mode and passive. Someone interested in networking should learn this command. Even though due to security issues, its usage has become limited over the internet but it is used in large amounts locally. The FTP ( File Transfer Protocol), which is used by the ftp command in Linux, was developed in the 1970s and gained a lot of popularity within a very short time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |