Linux Basics-Common Linux network commands

Source: Internet
Author: User
Tags pings

OneWhat are the benefits of learning Linux network commands?

The advent of the network, our life is more convenient, and the efficiency of handling things more and more high, but also can see the cultural differences around the world. At the same time we accept new things more and more information, new things more and more information. Network for our ye civilian people is transparent only know that there are cable only, but for our program apes, need to understand the knowledge of the network, what IP address, gateway, routing Ah, and so the program apes need to know. Linux has a lot of network related commands, such as Ping, ifconfig, traceroute, netstat and so on these commands can understand the knowledge of the network.

second, the commonly used network command

(1) Write username: send a message to the specified online user, press Ctrl+d to save the send.

(2) Wall message: Send a message to all online users, i.e. broadcast. Where wall is the meaning of write all, the broadcast mechanism causes itself to receive messages as well.

(3) Mail username: Send mail to the specified user, press Ctrl+d to save the send. The other side of the Linux command will be prompted to receive a message, to view the message is also used by the Mail command.

(4) Ping IP (hostname): Check that the computer is connected to the specified IP address or host network. This command is a bit different from window, and Linux will always ping until the number of pings is specified.

PING-C 4 hostname: The command will only Ping 4 times, where C is the meaning of count

(5) Last: View login information for all users in the past to the present.

(6) Lastlog: View the most recent login information for all users in the system.

(7) Ifconfig: View and set information about the network card.

(8) traceroute hostname: View the network path of the packet to the specified host.

(9) Netstat option: View network-related information, where option is optional:

-T:TCP protocol

-U:UDP protocol

-L: Monitor

-R: Routing

-N: Display IP address and port information

Three, the effect demonstration

(1) using write username to send a message to the specified user, the Linux command is as follows, as shown in 3-1

1 Write JSG

 

                          Figure 3-1

(2) using mail username to send mail to the specified user, the Linux command is as follows, as shown in 3-2

1 Mail jsg

  

Figure 3-2

(3) Use the ping command to check if the computer is connected to the specified host network and specify the number of pings, the Linux command is as follows, as shown in 3-3

1 Ping 5 www.microsoft.com

  

                          Figure 3-3

   

This is the end of it, originally wanted to demonstrate traceroute this command, but the CentOS 7 does not let the data to the specified host of the detailed network path, all displayed as *******.

It's a nice weekend again ...

Linux Basics-Common Linux network commands

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.