How to Fix Low Disk Space Issues on Ubuntu Linux
![]() |
There are times when computer users experience situations where the system suddenly becomes slow or applications unexpectedly terminate.
One of the possible causes of such behavior is an issue related to memory usage.
Memory is a component that temporarily stores data while the operating system and applications are running.
Accurately understanding the state of memory is a fundamental task for analyzing and understanding how a system operates.
Monitoring memory usage helps users understand the current state of the system and how resources are being allocated.
By checking memory usage, you can identify:
How much memory is currently in use
Whether the system has enough available memory
How memory is shared between applications, buffers, and cache
Potential memory pressure situations
These insights are useful for desktops, development environments, servers, and testing systems alike.
Linux uses memory aggressively to improve performance.
Unused memory is often allocated to buffers and cache, which helps speed up file access and system operations.
As a result, Linux systems may appear to use a large amount of memory even when they are operating normally.
Understanding this behavior is essential to interpreting memory statistics correctly.
free CommandThe free command is one of the simplest ways to view memory usage.
free
To display values in a more readable format, use:
free -h
total: Total physical memory installed
used: Memory currently in use
free: Memory not currently used
buff/cache: Memory used for buffers and cache
available: Memory that can be used by new applications
The available field is particularly important, as it represents memory that can be allocated without affecting system performance.
/proc/meminfoLinux exposes internal system information through the /proc virtual filesystem.
Detailed memory statistics can be found here:
cat /proc/meminfo
![]() |
| cat command |
This file provides extensive information, including:
MemTotal
MemFree
MemAvailable
Buffers
Cached
SwapTotal
SwapFree
This method is commonly used by monitoring tools and automation scripts.
topThe top command displays real-time system activity.
top
The top section of the output shows overall memory and swap usage, while the lower section lists running processes.
MiB Mem: Total, used, and free memory
MiB Swap: Swap usage statistics
%MEM: Percentage of memory used by each process
This view helps identify which processes are consuming the most memory.
![]() |
| top command |
htop for a Visual Overviewhtop is an enhanced alternative to top, offering a more user-friendly interface.
htop
Features of htop include:
Visual memory usage bars
Easy sorting by memory consumption
Keyboard and mouse interaction
Its graphical layout makes it easier to interpret memory usage patterns, especially for new users.
![]() |
| htop command |
vmstatThe vmstat command provides a snapshot of system resource activity.
vmstat
Memory-related columns include:
free: Available memory
buff: Buffer memory
cache: Cache memory
Running vmstat at intervals can help observe memory usage trends over time.
![]() |
| vmstat command |
On Ubuntu desktop systems, memory usage can also be monitored using graphical tools.
The System Monitor application provides:
Visual graphs of memory usage
Per-process memory consumption
Combined CPU, disk, and network information
This approach is useful for users who prefer a visual overview rather than command-line tools.
When physical memory is insufficient, Linux uses swap space, which is stored on disk.
Swap usage can be checked with:
swapon --show
Swap information is also displayed in the output of free -h.
Swap improves system stability by preventing memory exhaustion, although it is slower than physical memory.
![]() |
| swapon command |
When analyzing memory usage on Linux, it is important to keep the following points in mind:
Cache memory is released automatically when needed
Low “free” memory does not necessarily indicate a problem
The “available” value provides a better picture of usable memory
Short-term spikes in memory usage are often normal
Long-term trends are more meaningful than single measurements
Understanding how memory values relate to one another helps avoid misinterpretation.
Checking memory usage is one of the fundamental tasks in system operation.
Linux and Ubuntu provide a variety of tools and commands that allow users to monitor memory status.
By using tools such as free, top, /proc/meminfo, and the system monitor, it is possible to clearly understand how the system is currently operating.