【Linux】查看还剩余的内存

服务器运行的结果:
在这里插入图片描述

其中,
free -h 适于可读方式显示内存信息

[root@iZwz9apu1bn3mc2q9ui290Z ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        714M         88M        828K        1.0G        969M
Swap:            0B          0B          0B

       total           used           free              shared             buff/cache         available
 总计物理内存的大小    已用内存      剩余可用内存    多个进程共享的内存总额    磁盘缓存的大小     剩余的可用内存数

free -g 以G为单位显示

[root@iZwz9apu1bn3mc2q9ui290Z ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:              1           0           0           0           1           0
Swap:             0           0           0

free -m 以M为单位显示

[root@iZwz9apu1bn3mc2q9ui290Z ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1839         713          88           0        1036         969
Swap:             0           0           0

free

[root@iZwz9apu1bn3mc2q9ui290Z ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1883724      731052       90988         828     1061684      992784
Swap:             0           0           0
发布了34 篇原创文章 · 获赞 13 · 访问量 531

猜你喜欢

转载自blog.csdn.net/qq_43263647/article/details/105420490