This is a guide on how to connect to Ubuntu ftp using command line.
- Type ftp and enter to continue.
- Type open and enter to continue.
- Type ftp server ip address and enter to connect to ftp server.
- If connected, type login name and enter.
- Type user password and enter. If the username and password are valid, then you'll be in.
Here is the actual example from Ubuntu command line terminal:
luzar@ubuntu:~$ ftp
ftp> open
(to) 192.168.1.3
Connected to 192.168.1.3.220
---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 10:42.
Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (192.168.1.3:luzar):
331 User luzar OK.
Password required
Password:
230-User luzar has group access to:
luzar admin lpadmin fuse
230- plugdev video dip audio floppy cdrom dialout adm
230 OK. Current directory is /home/luzar
Remote system type is UNIX.Using binary mode to transfer files.
ftp>
Now that you are already in the ftp server, let's check the Ubuntu ftp command that you can use. Type help:
ftp> help
Commands may be abbreviated. Commands are:
! debug mdir qc send$
dir mget sendport siteaccount disconnect
mkdir put sizeappend exit mls
pwd statusascii form mode quit
structbell get modtime quote systembinary
glob mput recv suniquebye hash
newer reget tenexcase help nmap
rstatus tickcd idle nlist rhelp
tracecdup image ntrans rename typechmod
lcd open reset userclose ls
prompt restart umaskcr macdef passive
rmdir verbosedelete mdelete proxy runique ?
ftp>
That's all the ftp commands that you can use.The most important command in ftp is help. The ftp help command is similar to whatis command in Linux. The ftp help command syntax is
ftp> help get
get receive file
You can also use ? to check ftp command meaning. It is the ftp help command short form. Here is an example of ftp ? command:
ftp> ? put
put send one file
ftp>
You can use ls command to list a directory content in ftp server:
ftp> ls
200 PORT command successful
150 Connecting to port 39545
-rwxrwxrwx 1 luzar luzar 16 Nov 4 06:36 File.txt
drwx------ 3 luzar luzar 4096 Oct 21 11:14 folder
-rw-r--r-- 1 luzar luzar 89 Nov 4 09:48 mysql-init
-rw-r--r-- 1 luzar luzar 16 Nov 4 08:52 new-file.txt
226-Options: -l226 4 matches total
ftp>
The ftp command used to download a single file from a server is get.
The ftp command used to download a multiple files from a server is mget.
The ftp command used to upload a single file to a server is put.
The ftp command used to upload a multiple files to a server is mput.
If you want to exit frm ftp, use ftp bye command.
That's the basic ftp commands you need to know to use ftp in the Ubuntu command line terminal. You can check the rest of ftp commands with help like the example above.
That's all.
Very useful thanks
ReplyDeleteHi, can you help me?
ReplyDelete1 - Is there a way to use this comand (ftp) to enter an ftp without the ip address?
2 - Is there a way to sync 2 files (in the ftp server and in my computer) using this comand or other that you could know of from the comand line?
What I want is a way to make an executable to sync files automatically when clicked...
How to navigate to a location, which is given by link
ReplyDeleteI am in Ubuntu rescue mode, and it seems ftp is not present on this distribution...
ReplyDeletehow do I add the gui to my command line ftp installation, I have issues connection to my web admin console and would like to have local admin console access.
ReplyDeleteWe have an ftp server at work which is running in Ubuntu Command line mode. Our web admin console is not currently accessible, although we can log into our existing ftp accounts. What do I need to do to add an admin console to the existing ftp server so I can created/edit/delete accounts directly on the server rather than only being able to do that through the web browser remotely.
ReplyDelete