How to create swap device
-
swapon /swap
-
mkswap /swap
-
mknod /dev/swap
-
Not possible
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.