Basics of Linux Commands

Source: Internet
Author: User

Introduction to some basic Linux common commands and tips

Bibliography: Brother Bird's Linux private cuisine

Switch machine

Data synchronously written to disk: Sync

Restart: Reboot (restart immediately) Shutdown-r now (restart now) Shutdown-r +x (restart after x minutes)

Shutdown: Poweroff (perform sync before shutdown) shutdown-h now (shut down immediately) Shutdown-h +x (shut down after x minutes) shutdown-h xx:xx (Power off at Xx:xx)

Command-line Tips

Exit command line: Exit

Command completion: Any character before any action + press [Tab][tab] to appear prompt all complete commands

ls+ for two consecutive times [Tab][tab] ls            lsblk        lscp         lsinitramfs  lslogins     lspci        lssubsys     lsar         lsb_release  Lscpu        lsipc        lsmod        lspgpot      lsusb         lsattr       Lscgroup     lshw         lslocks      LSNs         lssu     

File completion: The first n characters of any file or folder + press [Tab][tab] to complete the file name (IBID.)

Stop running: [ctrl]+c

End input: [ctrl]+d

Operating instructions: man [command]

man-f [command]: Lists all the file descriptions associated with the command:

man-k [command]: Contains all the description files for the command keyword

[Email protected]:~$  man ls
ls (1) User Commands ls (1)
The number on the right of the command shows:
1: Commands or executables that the user can manipulate in the shell environment
2: Functions and tools that the system kernel can invoke
3: Some commonly used functions or function libraries
4: Device file description, usually files under/dev
5: Format of configuration files or some files
6: Game
7: Conventions and protocols, such as Linux file system, network protocol, Ascall code and other instructions
8: System administrator Commands available
9: Documents related to Kernel

Man page Description:
Name //short command, data name Description
Synopsis//Command basic Syntax
DESCRIPTION//A more complete command description
Options //For synopsis, the list of all available option descriptions
COMMANDS//When the program (software) executes, commands that can be executed inside
files/Documents used or referenced by or connected to the program or data
See ALSO//related other instructions
EXAMPLE//reference Example
BUGS

Other

Display date and time: Date +[%y/%m/%d%h/%m] ("+" plus any parameters, respectively "month and Day Hours")

Show Calendar: Cal [[month] year] (parameter is year or month)

Calculator: BC (+-x%/Five basic operations, quit away)

2018-01-01

17:02:03

Basics of Linux 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.