Interview Prep/Linux/Storage & Memory

What does `free -h` show and how do you read it?

BeginnerConceptStorage & Memory
Answer
               total   used   free  shared  buff/cache  available
Mem:            15Gi   4.1Gi  0.4Gi   0.2Gi       11Gi       10Gi
Swap:          2.0Gi      0B  2.0Gi

Look at available, not free. "free" is completely unused RAM, which is small on any healthy server. buff/cache is page cache the kernel reclaims when apps need memory. "available" estimates how much can be given to new workloads without swapping.

All Linux questions Roadmap: Linux

More on Storage & Memory