Multiple choice technology programming languages

How to create swap device

  1. swapon /swap

  2. mkswap /swap

  3. mknod /dev/swap

  4. Not possible

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The mkswap command initializes a file or partition to be used as swap space by setting up the swap header and metadata. After mkswap, swapon enables the swap device. Option A enables existing swap but doesn't create it. Option C creates a device node but doesn't initialize swap format. Swap creation is definitely possible.