Linux Command note

Source: Internet
Author: User

~
Abbreviation of the current user directory


Cd ~


CD/home/<user-Name>/

 

-- Help
Get help


Vi -- Help

 

Tab
Auto-completion. Double-click the tab to display the completion prompt.


If the current command is unambiguous, it is complete. If there is any ambiguity, double-click to list the prompt options.


CD/E [Tab], complete with CD/etc/


CD/B [tab-Tab], listing options bin/boot/

 

 

------------------------------------------------------------

 

 

Ls
Directory List. Similar to Dir

 

PWD
Display current working directory

 

Cat
View files


Cat 01.txt


Cat 01.txt> 02.txt is added to the end of 02.txt

 

PS
Process List


-E, all processes


-F, complete extra full process information


PS-Ef | grep [Key]: filter process information containing the key

 

Kill
Close Process

 

VI
Text Editor


Command mode and input mode, which are in command mode by default. In input mode, ESC returns to command mode.


Command
I, insert before the cursor


A. Insert the cursor


O, Insert a new row


R, replace the current character


X, after deleting the cursor


CTRL + u: delete text entered in input mode


: W, save the current document


: Q. Exit VI.


VI 01.txt


: WQ! Force Execution

 

Sudo
Improve the command running permission. Applicable to All commands


Sudo VI/etc/hosts

 

Chmod
Modify the access permission of a file or directory.

 

Nohup background running process. Nohup [command] &

Nohup Java-jar importdata. Jar &

 

DF
The remaining disk space. -M is measured in MB.

 

Du
Used disk space. -A: All subdirectories;-C: returns the statistical value.

 

----------------------

 

Linux environment variable Summary

Http://blog.csdn.net/ddviplinux/archive/2009/06/18/4280433.aspx

 

Export java_home/home/My/JDK/

Export environment variables. This logon is valid.

 


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.