Add by Zhj: saying so much, actually looking at the first line is enough, the free item is unused memory. Actually, I feel like there's no need.
Using the free command, use top instead.
Original: http://liustb.blog.163.com/blog/static/1337080192011718112434416/
The free command is used to view memory usage and is less expensive than the top command.
$free –m
Total used free shared buffers Cached
MEM:1002 769 232 0 62 421
-/+ Buffers/cache 286 715
Swap 1153 0 1153
Note: When you understand the output of the free command, you distinguish between two concepts: the first line (mem), which is for the operating system, and the buffer and cache for the operating system are used memory. The second line (-/+ Buffers/cache) is for the application, and for the application,both the buffer and the cache belong to the memory that can be used.
So:
First Line ( mem):
Total: The amount of physical memory that the system can use is 1002;
Used indicates that the memory allocated is 769, including the buffer and cache memory 286 that have been actually used, unused buffer memory 62, unused cache memory 421, namely 769 = + 421 + 286;
Free: Indicates that the unallocated physical memory is 232;
Buffers: Buffer memory that has been allocated by the system but not used ;
Cached: The cache memory 421 that has been allocated but not used;
second row ( -/+ buffers/cache);
Used: buffer and cache memory that have been really used by the application are 286;
Free: the memory that can be used by the application is 715, which includes: Buffer memory 62 that has been allocated but not used, cache memory 421 allocated and unused, and memory 232 not allocated , i.e.: 715 = + 421 + 232;
another: The difference between buffer and cache in Linux:
Buffer: The data memory to write to the hard disk;
Cache: Data memory read into memory;
Linux in Memory View command free detailed (GO)