Linux Common basic Commands __linux

Source: Internet
Author: User

Turn from: http://blog.csdn.net/xiaoguaihai/article/details/8705992


Many of the most common commands in Linux must be mastered, and here I share some of the basic commands I learned when I started Linux, hoping to help you.


This is I will be the book on the bird in the collation, I hope not to involve copyright issues.


1, display the date of instruction: date



2, display the calendar instructions: Cal


3, simple and easy to use calculator: BC


How can 10/100 turn out to be 0? This is because the BC preset outputs only integers, and if you want to output the decimal point number, you must perform Scale=number, which is the number of decimal places, for example:



4, important several hot keys [tab],[ctrl]-c, [ctrl]-d

[TAB] key---The function of "command complement" does not "file complete"


[Ctrl]-c Key---Let the current program "Stop"


[The CTRL]-D key---typically represents: "Keyboard input ends (end of File, EOF ring Ofinput)", and he can also be used to replace exit


5, Mans

exit with Q,

Man-f Mans



6. Data Synchronization Write disk: Sync

Enter sync, the data that is not yet updated in memory, will be written to the hard drive, so the 挃 is important before the system shuts down and reboots 乀. It's best to do it more times.



7, the customary shutdown instructions: Shutdown


In addition, it is important to note that the time parameters must be added to the instructions, otherwise shutdown will automatically jump to Run-level 1 (that is, single maintenance login), which is nerve-racking. Here are some examples of time parameters:



Reboot , shutdown: reboot, Halt,poweroff



8. Switch execution level: init

There are seven levels of execution for Linux:


--run Level 0: Shutdown


--run Level 3: Plain text mode


--run Level 5: Contains graphics interface mode


--run Level 6: reboot


 

Use the init command to toggle each mode:


if you want to shut down, you can also use the following instructions to turn off the computer except for the shutdown-h now and Poweroff:



9, change the file belongs to the group: Chgrp


10. Change document owner: Chown

He can also modify the name of the group directly mandatory



11, change the file permissions: chmod

There are two ways to set permissions, and you can use numbers or symbols to change permissions.


--Number Type change file permissions:



 

--Symbol type change file permissions:



12, view version information, etc.


13. Transform Directory: CD


14. Display the current directory: PWD


15, the establishment of a new directory: mkdir

 

It is not recommended to use the-p option because you are worried that if you typo, the directory name will be messed up.

16, delete the "empty" directory: RmDir


17, File and directory display: LS


18, copy the file or directory: CP

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.