Useful shell Commands

Source: Internet
Author: User

  1. Netstat
    netstat-print network connections, routing tables, interface statistics, masquerade connections, and Mul Ticast Memberships
    See Parameters:

    -A (All) displays all options and does not show listen related by default
    -T (TCP) displays only TCP-related options
    -U (UDP) displays only UDP-related options
    -N refuses to display aliases, showing all numbers converted to numbers.
    -l list only service status in Listen (listening)

    -P Displays the program name that establishes the associated link
    -R display routing information, routing table
    -e display extended information, such as UID, etc.
    -S statistics according to each protocol
    -C executes the netstat command every other fixed time.

    Hint: The status of listen and listening can only be seen with-a or-l

    NETSTAT-ANP//List all ports (including listening and not listening), display numbers without aliases, display the program name and PID for establishing RELATED links
    The above command combined with GREP:80 can be used to find a program that is using port 80.

    Specific reference: Linux netstat command detailed
  2. Lsof
    lsof-list Open files
    In a Linux environment, everything is in the form of files, with files that not only access regular data, but also access to network connectivity and hardware. So, such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) sockets, the system assigns a file descriptor to the application in the background, regardless of the nature of the file, which provides a common interface for the interaction between the application and the underlying operating system. Because the application opens a descriptor list of files that provides a lot of information about the application itself, it is helpful to see the list through the Lsof tool for system monitoring and troubleshooting.
    Specific reference: Linux lsof detailed
  3. ?

Useful shell 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.