Hack 89. Free command examples
by Ramesh
Free command displays all the necessary information about system physical (RAM) and swap memory.
- Syntax: free [options]
What is the total RAM on my system?
In the example below, the total physical memory on this system is 1GB. The values displayed below are in KB.
- # free
- total used free shared buffers cached
- Mem: 1034624 1006696 27928 0 174136 615892
- -/+ buffers/cache: 216668 817956
- Swap: 2031608 0 2031608
What is the total memory on my system including RAM and Swap?
In the following command:
- option m displays the values in MB
- option t displays the “Total” line, which is sum of physical and swap memory values
- option o is to hide the buffers/cache line from the above example.
- # free –mto
- total used free shared buffers cached
- Mem: 1010 983 27 0 170 601
- Swap: 1983 0 1983
- Total: 2994 983 2011
当前内容版权归 Ramesh Natarajan 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Ramesh Natarajan .