Common linux commands,

Source: Internet
Author: User

Common linux commands,

In linux systems, commands must be frequently used, and some commands may not be remembered, so it is very troublesome to search for them on the Internet. So here I will record the commonly used commands, and I will add new commands in the future.

1. cd command
1 cd document/test # enter 2 cd .. # Under the document/test directory based on the current directory to return 3 cd ~ # Return the root directory

 

2. ls command

 

-L: Lists long data strings, including object attributes and permission data.-a: lists all objects, together with hidden objects (beginning. -d: only list the directory itself, rather than list the file data of the directory-h: The file capacity is more readable (GB, kB, etc) column-R: It is listed together with the sub-directory content (recursively listed). It means that all files in the directory will be displayed.

 

3.tar command
Unpack: tar zxvf FileName.tar package: tar czvf FileName.tar DirName
More: http://www.blogjava.net/jiangjf/archive/2007/07/29/133122.html
4. cat command 
Example file test.txt: cat test
Learn more:Http://www.cnblogs.com/perfy/archive/2012/07/23/2605550.html

 

5. chomd command

Chmod [-R] xyz file or directory
-R: recursive continuous change, that is, all files under the subdirectory will be changed.

Chmod 0755 file # change the file Permission to-rxwr-xr-xchmod g + w file # Add the user group writable permission to the file Permission.

More: http://man.linuxde.net/chmod

 

6. vim command

Vim test # If the test file exists, edit the file. If the test file does not exist, create a new one and then edit it.

To edit the test file:

1. vim test

2. Press I to enter the insert mode.

3. wq indicates saving AND EXITING

More: http://www.runoob.com/linux/linux-vim.html

 

7.

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.