Linux System Management Command usage instructions

Source: Internet
Author: User
Tags memory usage safe mode

Shutdown command

The shutdown command can safely shut down or restart the Linux system, prompting a warning message to all logged-in users on the system before the system shuts down. The command also allows the user to specify a time parameter, either as a precise time or as a time period from now onwards. The exact time format is hh:mm, which represents hours and minutes, and the time period is represented by the "+" and the number of minutes. When the system executes this command, data synchronization is performed automatically.

The general format for this command is: Shutdown the options in the [options] [TIME] [warning messages] command mean:

-K does not really turn off the computer, but only sends a warning message to all users.

-R reboot immediately upon shutdown.

-H shutdown does not restart.

-F Fast shutdown, skip fsck during reboot.

-N Fast shutdown without the INIT program.

-C cancels a shutdown that has already been run.

Specifically, this command is available only to Superuser.

Free command

The free command displays system memory usage information, how much memory is used, and how much memory is idle.


Grammar is

Free [command switch] [-v]

Command switch:

-B Display memory usage in bytes
-K Displays the memory usage in kilobytes.
-M Displays the memory usage in megabytes.
-S delay Continuously output memory usage. Displays the memory usage at intervals of time for the delay of typing.
-T Displays the summary usage of memory.


Display Memory size information:


Total used free shared buffers Cached

mem:223740 219492 4248 0 3756 73212

-/+ buffers/cache:142524 81216

swap:1052216 66732 985484

The free command displays all of the system's memory information, such as the total amount of memory used and the size of the available content.

To display memory information using a file:


memtotal:223740 KB

memfree:8512 KB

buffers:4432 KB

cached:67860 KB

swapcached:15032 KB

active:172484 KB

inactive:20168 KB

hightotal:0 KB

highfree:0 KB

lowtotal:223740 KB

lowfree:8512 KB

swaptotal:1052216 KB

swapfree:985488 KB

dirty:52 KB

writeback:0 KB

mapped:166064 KB

slab:14860 KB

committed_as:541000 KB

pagetables:3260 KB

vmalloctotal:794616 KB

vmallocused:3056 KB

vmallocchunk:791084 KB



hugepagesize:4096 KB

The above command displays the system's memory usage information.

Top command

Use Rights: All users

How to use: Top [-] [D delay] [Q] [C] [s] [s] [i] [n] [b]

Description: Real-time display of process dynamics


D: Change the speed of the display, or press s in the conversational instruction column (interactive command)

Q: There is no delay in the display speed, if the user has Superuser permissions, then top will be the highest priority to execute

C: Toggle display mode, there are two modes, one is to display only the name of the execution file, the other is to display the full path and name S: Cumulative mode, will be completed or disappeared child stroke (dead children process) of the CPU time accumulated

S: Safe mode, canceling conversational instruction to avoid potential crisis

I: Do not show any idle (idle) or useless (zombie) trip

N: Number of updates, and will exit top after completion

B: Batch file mode, with "n" Parameters used together, can be used to output the top results to the file


Display the update 10 times after exiting;

Top-n 10

The user will not be able to use the conversational instruction to command the trip:


Enter the results of the update display two times into the file named Top.log:

Top-n 2-b < Top.log

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.