How to check the usage of swap in Linux?
The following command can be used to check the swap usage in a Linux system:
- cost-free
free -h
- enable paging and swapping in the operating system
swapon -s
- vmstat is a command used in Unix and Linux operating systems to display virtual memory statistics.
vmstat -s
- best
- htop is a software application.
top
Or
htop
The above command allows you to check the usage of swap in a Linux system, in order to monitor the memory resources of the system in a timely manner.