System and processes
The swapon command
Enables swap memory and shows which one is in use.
Syntax
swapon --show | swapon DISPOSITIVOMost useful options
--showShows the active swap-aEnables all swap from fstabCopy-ready examples
$ swapon --showActive swapYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- It needs sudo to enable devices.
FAQ
How much swap do I need?
A common rule is equal to or twice the RAM on small machines.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course