Linux command accumulation

Source: Internet
Author: User

  

    • Common commands

Ipconfig-view native IP, interface and other information

Ping ip-ping remote server or terminal

CD ~-Return to the root directory

Cd.. Return to Parent Directory

Cd..  /.. Return to the top level two directory

CD temp/into the temp directory under the current directory

Description: The directory structure of Linux, "." Represents the current directory, "..." Represents the parent directory of the current directory, "/" for the root directory

NETSTAT-NTLP |grep 9000 View 9000 port usage process (assuming process PID is 1354)

Kill-9 1353 forced to kill the PID 1354 process

Top View Server Resource Usage

    • Installation of MySQL under Linux

    • File editing under Linux
      • VI File Directory/* Open the file and enter command mode */
      • I/* input I, into Insert edit mode (insert) */
      • Press ESC/* to exit to command mode */
      • : Wq/* Save and Exit */
      • : wq! /* Force Save Exit */
      • : q! /* Force Exit */

Get root Permissions

Switch to root:

Esc-es

Su-

Sudo-es switches to the root user and can bring the environment variables over

Exit Command: CTRL + C

View disk space: DF-HL

To view server Resource usage: top

Change the owner of a File/folder: Chown username xxx

Add a user xxx to the root group: usermod-g rootgroup XXX

Change the permissions of XXX to readable writable executable: chmod-r 777 xxx

Delete all files under the Dir folder: rm-rf/dir/*

Delete all files under current folder: RM-RF *

Linux command accumulation

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.