Three. Linux Basic 50 commands

Source: Internet
Author: User

1.pwd View the location of your current directory

2.CD entering the current directory (folder)

? CD/Go to root directory

? CD/path Enter the directory of the specified path

? Cd.. Returns the last directory equivalent to backspace in Windows

3.ls View what files in the current directory are equivalent to double-click Open Files in Windows

? Ls-l View the details of the current directory, whether it is a directory or a file

? LS-LH View the size of the file or directory in the current directory is in byte units

? Ls-a to view hidden files or directories

4.vim +/Path Creation file

? Vim. Create a hidden file

5. Cat view the specific contents of the file jump directly to the end of the file

? More view more file contents Press Enter to view by line by space is faster view

6. MkDir Create directory (folder) +/path Create directory at specified location

? Mkdir-p file name/file name/file name/recursive creation directory

7.MV file name + path moves the specified file to the specified location

8. Tree Display Directory If there is no trees command to play yum-y install tree load tree commands

9.RM Delete files generally do not use this command, delete files cannot reply

? >+ file name Empty symbol empty the contents of the file

? Generally, the unused files or directories are moved to the/tmp Recycle Bin with the MV command.

10.CP commands for copying files

? CP + FileName +/path Copy the file to the specified location

11.find/-name "file name" find specified file in/directory

? Find/-name "*. File name" in/down look for all files with a filename suffix such as Find/-name "*.log" in/down find all the log suffix files

? Find/-name * file name * Fuzzy query

? Find/size +10m | Xargs LS-LH to search for files above 10M and return the eligible file name and directory name ("| "As pipe character")

12.df-h viewing memory usage for Linux systems

13.du-sh View the size of the current directory

14.free-m viewing the memory of the server

15.top Viewing server program memory usage

? User is the CPU that represents the users process

? System is the CPU that the operating system itself occupies

? Idle CPU free Rate

? Iowait CPU waits for IO time than

? total-used = buffers + Free + Cached

16.ip A view the current IP address

17.kill + process number ends the process, equivalent to the end program in Windows

18.grep Crawl Command

? The word + filename in the grep + file is crawled directly to the file

? The Word file name in the Grep-n file crawls to the file and displays the line where the file is located

19.vim + file name +n (number of lines) jump directly to the row for quick editing

20.tar file name created by ZCVF. tar.gz + file name packages The specified files, equivalent to compressed files in Windows

? Tar zcvf the file name created by the. tar.gz./* To package files in the current directory

21.SZ + file name in packaged files download

? If there is no SZ command in Linux, enter yum-y install lrzsz Mount SZ command

Useradd User name Add user

23.chown root.root file name/create user, Owner

24.chmod 755 file name/permissions to change files

Three. Linux Basic 50 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.