Type the command

  • One is that the command displays the result directly and then goes back to the command prompt character to wait for the next command to enter
  • One is to enter the environment of the command and not return to the environment of the command prompt character until the end of the command

shortcuts

  • [Tab], automatic completion
  • [Ctrl]-cstop
  • [Ctrl]-dEnter end, exit.

Use the help

[command] –help

Almost every command

Universal manual

Man [command] Displays the command description manual

The first line of the manual displays COMMAND[n], where n indicates the meaning of the current COMMAND or file, as shown in the following table

Code name On behalf of the content
1 Commands or executable files that the user can manipulate in the shell environment
2 System core can be called functions and tools, etc
3 Some common functions and function libraries, most of the C function library (liBC)
4 Description of device files, usually files under /dev
5 Configuration files or the format of certain files
6 Games (games)
7 Conventions and protocols, such as Linux file systems, network protocols, ASCII code, etc
8 Administrative commands available to system administrators
9 Kernel-related files

It is very important to 1/5/8

If you only know the keywords related to the command, you can use man -f command

If you only know the keywords that can describe the command, you can use man-k description

You can enter keywords related to this command. For example, if you want to find an edit command, you can enter man-k edit

Use the search results to find the command you want.

Sometimes the result of a search might be something like this and you can use man n command to determine which command to use.

reboot(2)
reboot(8)
Copy the code

The shutdown command

Shutdown poweroff HALT both stand for shutdown, essentially calling systemCTL.

shutdown -[para]
shutdown -h time
Copy the code

The default shutdown time is not one minute. The format of time can be: +30,20:30, and 60 indicate the shutdown after 30 minutes,20:30, and 60 minutes respectively.

Systemctl System management tool

systemctl reboot
systemctl poweroff
systemctl shutdown
Copy the code

  • In terminal mode, if you know a command but forget its options and parameters, use –help to query for information.
  • When there is any command or file format that you don’t know, but you want to know about it, please use man or info to look it up!
  • If you want to build other services, or use a whole suite of software to do something, check out the documentation under /usr/share/doc.
  • Also, again, since Linux was invented by foreigners, there are fewer Chinese files! But don’t be afraid. Keep an English dictionary by your side. Look it up anytime! Don’t be afraid of English!