可以使用命令cat / proc / meminfo找到linux安装的总大小。 命令cat / proc / meminfo的输出已粘贴在下面:
**root@ubuntu:~# cat /proc/meminfo
MemTotal: 2945180 kB
MemFree: 246192 kB
Buffers: 628264 kB
Cached: 1209428 kB
SwapCached: 8 kB
Active: 1109340 kB
Inactive: 1371376 kB
Active(anon): 367848 kB
Inactive(anon): 525764 kB
Active(file): 741492 kB
Inactive(file): 845612 kB
Unevictable: 35316 kB
Mlocked: 33800 kB
SwapTotal: 262140 kB
SwapFree: 254360 kB
Dirty: 228 kB
Writeback: 0 kB
AnonPages: 678272 kB
Mapped: 152292 kB
Shmem: 241028 kB
Slab: 102520 kB
SReclaimable: 70884 kB
SUnreclaim: 31636 kB
KernelStack: 3272 kB
PageTables: 27912 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1734728 kB
Committed_AS: 3313224 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 553504 kB
VmallocChunk: 34359174859 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 63488 kB
DirectMap2M: 1894400 kB**
是否有其他命令可以找到linux安装的总大小。
答案 0 :(得分:2)
这实际上取决于您的包装系统。实质上,您需要查询系统上所有已安装软件包的大小。
或者,您可以使用df和du来计算已用空间,减去/ tmp和/ home。