This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Linux 释放缓存空间
Linux 下释放 cache 空间命令如下:
```bash
# 在释放缓存前应该先
sync
# 手动释放内存
echo 3 > /proc/sys/vm/drop_caches
# 查看内存是否已经释放
free -h
```
drop_caches 的值可以是 0-3 之间的数字,代表不同的含义:
- 0:不释放(系统默认值)
- 1:释放页缓存
- 2:释放dentries和inodes
- 3:释放所有缓存