Skip to main content
Linux AdministrationMediumSingle Choice

Linux Administration Question

Statement

Which command will disable swapping on a device?

#swapoff#swapon#swap-device#paging
A

swapoff

Correct
B

swapon -d

C

unswap

D

mount -u

Resolution & Explanations

The swapoff command disables swapping on a specified device or file. It is the counterpart to swapon, which enables swapping. When a swap device is disabled, the system no longer uses it for paging, freeing up the device for other purposes. The command syntax is swapoff /dev/sdX or swapoff /path/to/swapfile.