System and processes
The mkswap command
Prepares a partition or file to be used as swap memory.
Syntax
mkswap DISPOSITIVOCopy-ready examples
$ sudo mkswap /dev/sda2Prepare the swapYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- mkswap only prepares; you must enable it afterwards with swapon.
FAQ
What is swap?
Disk space the system uses as memory when it runs out of RAM.
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