Common Linux commands and common linux commands

Source: Internet
Author: User

Common Linux commands and common linux commands

There are too many commands in Linux. Here we will sort out some of them for the time being. For the sake of practicality, no specific parameters are listed here.


Part 1: File Operations

Ll view directories and files in long format

Ls to view directories and files in short format

Df-h view disk size information

Mkdir dir_name: Create a folder

Rm-rf file_name Delete directory

Rm-f file_name delete file

Mv file path: Move the file to the path directory.

Cp file path: copy the file to the path directory.

Cat file

Vi/vim file

Pwd: view the path of the current File System

Uniq a.txt> B .txt re-operate a.txt and write the result to B .txt.

Sort a.txt> B .txt writes the.txt sequence to B .txt.

Uniq a.txt | sort> B .txt: Execute a.txt first and then sort the result to B .txt.

Wc-l a.txt statistics a.txt rows

Find path-name file: find the file named file in the path directory. You can use * as the wildcard.

Find path-name file_name | xargs grep-nH content find the specified content in the specified file


Part 2: Process Information

Ps-aux

Ps | grep java lookup Process

Kill-9 process killing by pid according to process number

Killall-9 java kills all java Processes

Free view memory

Top view CPU Information


Part 3: rpm package management

Rpm-qa list all rpm Software

Rpm-qa | grep name check whether software named name is installed


Part 4: restart and shut down

Reboot restart

Shutdown-h now shutdown

 

Part 5: Other parts

Passwd Change Password

& Background Startup Process

Service network restart network service






















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.