← 返回命令列表

Linux command

free 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

free

Example

free -h

Example

free -m

Example

free -g

Refresh

free -s 2

Example

free -t

Example

free -hw

Example

free -s 2 -c 5

说明

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered from /proc/meminfo.

参数

-b
Display in bytes
-k
Display in kilobytes (default)
-m
Display in megabytes
-g
Display in gigabytes
-h, --human
Display in human-readable format with units
-s, --seconds delay
Continuously display output every delay seconds
-c, --count count
Display output count times (use with -s)
-t, --total
Display a line showing totals
-w, --wide
Wide output (separate buffers and cache)
-l, --lohi
Show detailed low and high memory statistics

FAQ

What is the free command used for?

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered from /proc/meminfo.

How do I run a basic free example?

Run `free` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -b do in free?

Display in bytes