Linux Learning Series 9--network communication

Source: Internet
Author: User
Tags file transfer protocol ftp hostname

ping command

The ping command sends an answer request to a host on the network, which determines whether the remote host is available based on the response information.

Syntax for the ping command:

$ping hostname or ip-address

If the network is unblocked, you will soon see the response information.

For example, detect if you can connect to a Google Host:

$ping google.comping google.com (74.125.67.100) (+) bytes of data.64 bytes from 74.125.67.100:icmp_seq=1 ttl=54 time=3 9.4 ms64 bytes from 74.125.67.100:icmp_seq=2 ttl=54 time=39.9 ms64 bytes from 74.125.67.100:icmp_seq=3 ttl=54 time=39.3 Ms64 bytes from 74.125.67.100:icmp_seq=4 ttl=54 time=39.1 ms64 bytes from 74.125.67.100:icmp_seq=5 ttl=54 time=38.8 ms-- -Google.com Ping Statistics---packets transmitted, received, 0% packet loss, time 21017msrtt Min/avg/max/mdev = 38 .867/39.334/39.900/0.396 ms$

If the host is not responding, you can see information similar to the following:

$ping giiiiiigle.comPing:unknown host giiiiigle.com$
FTP Tools

FTP is the abbreviation for file Transfer Protocol, called the Files Transfer protocol. With the FTP tool, you can upload files to a remote server or download files from a remote server.

The FTP tool has its own commands (like Linux commands) and can:

    • Connect and log in to the remote host;
    • View the directory, traverse the directory files;
    • Upload or download files, including text files, binary files, and so on.


The FTP command uses the following:

$ftp hostname or ip-address

You will then be prompted to enter your user name and password, verify that it will go to the home directory after success, and then you can use the FTP tool command.

FTP command Description
Put filename Upload the local file to the remote host.
Get filename Download the remote file locally.
Mput file List Upload multiple local files to the remote host.
Mget file List Download multiple remote files locally.
Prompt off Close the prompt. By default, using the Mput or mget command keeps prompting you to confirm the file's upload or download.
Prompt On Open the prompt.
Dir Lists all files in the current directory of the remote host.
CD dirname Change the remote host directory.
LCD dirname Change the local directory.
Quit Log out.


Note that all uploads and downloads are for the current directory of the local host and the remote host, and if you want to upload the files in the specified directory, you first need to CD to that directory before uploading.

Examples of using FTP tools:

$ftp amrood.comconnected to amrood.com.220 amrood.com FTP server (Ver 4.9 Thu Sep 2 20:35:07 CDT) Name (amrood.com:amr OOD): amrood331 Password required for Amrood. password:230 User Amrood logged in.ftp> dir200 PORT command successful.150 Opening data connection For/bin/ls.total 14 64drwxr-sr-x 3 Amrood Group 1024x768 Mar one 20:04 maildrwxr-sr-x 2 amrood Group 1536 Mar 3 18:07 miscdrwx R-sr-x 5 Amrood Group 7 10:59 oldstuffdrwxr-sr-x 2 Amrood group 1024x768 Mar 15:24 bindrwxr-s R-x 5 amrood Group 3072 Mar 16:10 mpl-rw-r--r--1 amrood group 209671 Mar 10:57 MYFILE.OUTDRWXR-SR  -X 3 Amrood Group 5 13:32 publicdrwxr-sr-x 3 Amrood Group ten 10:17 pvm3226 Transfer complete.ftp> cd mpl250 CWD command successful.ftp> dir200 PORT command successful.150 Opening data connection for /bin/ls.total 7320-rw-r--r--1 Amrood Group 1630 8 1994 DBOARD.F-RW-R-----1 Amrood   Group 4340 Jul 1994 vttest.c-rwxr-xr-x 1 Amrood group 525574 Feb 11:52 wave_shift-rw-r--r--1 am Rood Group 1648 5 1994 wide.list-rwxr-xr-x 1 Amrood group 4019 Feb 16:26 fix.c226 Transfer Comp lete.ftp> get wave_shift200 PORT command successful.150 Opening data connection for Wave_shift (525574 bytes). 226 Trans Fer complete.528454 bytes received in 1.296 seconds (398.1 kbytes/s) ftp> quit221 goodbye.$
Telnet tool

The Telnet tool lets us connect and log on to the remote computer.

Once connected to a remote computer, you can do a variety of things on it, such as:

C:>telnet amrood.comtrying ... Connected to Amrood.com.Escape character is ' ^] '. Login:amroodamrood ' s password:************************************* * * * * * WELCOME to amrood.com * * * *                                                   ************************************ Last unsuccessful Login:fri Mar  3 12:01:09 ist 2009Last login:wed Mar  8 18:33:27 ist-on p TS/10   {Do  your work}$ logoutconnection closed. C:>
Finger Tools

Finger allows us to view the user information on the local host or remote host. Some systems disable the finger command for security purposes.

For example, to view native users online:

$ fingerlogin     Name       Tty      Idle  Login time   officeamrood               pts/0          June 25 08:03 (62.61.164.115)

To view information for a specified user on this computer:

$ finger Amroodlogin:amrood                           Name: (null) Directory:/home/amrood                 Shell:/bin/bashon since Thu June 08:03 (MST) o n pts/0 from 62.61.164.115No Mail. No Plan.

To view online users on a remote host:

$ finger @avtar. com Login     Name       Tty      Idle  Login time   officeamrood               pts/0          June 25 08:03 (62.61.164.115)

To view information about a user on a remote host:

$ finger [email protected] Login:amrood                           Name: (null) Directory:/home/amrood                 Shell:/bin/bashon since Thu June 08:03 (MST) on pts/0 from 62 .61.164.115No Mail. No Plan.

Linux Learning Series 9--network communication

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.