TestOut Linux Pro Practice Test 2025 – All-in-One Guide to Master Your Certification!

Question: 1 / 400

After adding RAM, how would you activate a new swap partition?

swapoff /dev/sdb2

mkswap /dev/sdb2

swapon /dev/sdb2

To activate a new swap partition after adding RAM, the command used is `swapon /dev/sdb2`. This command informs the Linux kernel that the specified partition should be utilized as swap space, allowing the system to use this additional memory resource. Swap space is an area on a hard disk that is used when the amount of physical RAM is full; it provides a way for the system to manage memory more effectively.

The process typically starts from the creation of the swap partition and setting it up to be recognized by the system. While `mkswap` is utilized to set up the filesystem on the swap partition, it only prepares it; it does not activate it. The `swapon` command is necessary to make that swap space actively available for use by the system.

Using `swapoff /dev/sdb2` would disable the swap space instead of enabling it, and `mount /dev/sdb2 /mnt/swap` would not apply, as swap partitions are not mounted like regular filesystems; instead, they are activated with the `swapon` command. Hence, the right command to use for activating a new swap partition is indeed `swapon /dev/sdb2`.

Get further explanation with Examzify DeepDiveBeta

mount /dev/sdb2 /mnt/swap

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy