Linux some commands

Source: Internet
Author: User

1. View system installation Software

RPM-QA//(excluding green installed software programs, which are not included directly in the installation directory)

Rpm-qa |grep GCC

Parameter explanation: q--inquiry

a--Search All

l--Display List

RPM is an abbreviation for Red Hat Package manager and is originally intended to be managed by Red Hat packages.

2. Check Port occupancy

#netstat-an | grep 8080//Verify that the 8080 port is already open

# Netstat-a//View all service port numbers

# NETSTAT-TLN//view Linux port usage, (often used)

3, 2>&1

Reference: http://www.cnblogs.com/yangyongzhi/p/3364939.html

By default, the standard input is the keyboard

By default, the standard output is the terminal

By default, the standard error output to the terminal

  The standard input, output, and error outputs are expressed as: STDIN, STDOUT, STDERR, or 0,1,2. 3~9 can also be used as a file descriptor, which is often employed as a temporary intermediate descriptor

 3.1 The difference between "2>&1 file" and "> File 2>&1":

1) Cat food 2>&1 >file: Error output to terminal, standard output redirected to file.
2) Cat food >file 2>&1: The standard output is redirected to the file, and then the error output is redirected to the same as the standard output, so the error is also output to file files.

4,-VV

Print client request and return information

5, Linux firewall Status View, turn off

Reference: http://blog.csdn.net/bslzl/article/details/7937899

Open: Service iptables start

Close: Service iptables stop

Linux some 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.