How do I find out if I have a swap partition on my hard drive?
Easy, graphical way to check with Disk Utility
-
Open Disk Utility from the Dash:
-
In the left column, look for the words "Hard Disk", and click on that:
-
In the right column, see if you can find "Swap" as shown. If so, you have swap enabled; you can click on that portion to see details. It will look something like this:
Alternately, open a terminal with Ctrl+Alt+T
, and type swapon -s
; if you see a line like the below, with statistics, swap is enabled:
In terminal, type:
free -m
If you happen to have swap, you will see how much swap memory you have left.
Use
cat /proc/swaps
In addition to the size, it will tell the type of swap (partition/file).
It appears to give exactly the same output as swapon -s
(posted here, but apparently deprecated).
Or
cat /etc/fstab
which will not give you the correct info in the (unusual) case of a swap added manually, as per comment by Carlo Wood.