XK0-004 · Question #359
A technician reviews the following output: Which of the following commands should the technical execute to ensure the system has the appropriate paging? (Select TWO.)
The correct answer is B. swapon /dev/sda5 C. Mkswap/dev/sda5. Configuring swap (paging) on Linux requires two steps - formatting the partition as swap with mkswap and then activating it with swapon.
Question
A technician reviews the following output:
Which of the following commands should the technical execute to ensure the system has the appropriate paging? (Select TWO.)
Exhibit
Options
- Add if=dev/sda5 of=/tmp bs=512
- Bswapon /dev/sda5
- CMkswap/dev/sda5
- DMkfs,ext3 /dev/sda5
- ELostat/dev/sda 5
- FFree -m/dev/sda
How the community answered
(15 responses)- B93% (14)
- E7% (1)
Why each option
Configuring swap (paging) on Linux requires two steps - formatting the partition as swap with mkswap and then activating it with swapon.
dd is a low-level data copying tool used for cloning disks or creating images, not for initializing or enabling swap space.
mkswap initializes a partition such as /dev/sda5 by writing the swap area header so the kernel recognizes it as swap space, and swapon then registers and activates that partition so the kernel can use it for paging. Both commands are required sequentially - mkswap prepares the structure and swapon enables it at runtime.
mkfs.ext3 formats a partition with the ext3 filesystem for general file storage, which would destroy any swap metadata rather than create it.
iostat reports I/O statistics for block devices and is a monitoring tool, not a swap configuration command.
free displays current memory and swap usage statistics but does not configure, format, or enable any swap partition.
Concept tested: Configuring Linux swap space with mkswap and swapon
Source: https://man7.org/linux/man-pages/man8/mkswap.8.html
Topics
Community Discussion
No community discussion yet for this question.
