Initialize a partition or file as swap.
Section: Format, Label, and Tune
Create swap area
bash
bash
sudo mkswap /dev/sdb2Explanation
Initialize a partition or file as swap.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Format, Label, and Tune