LPIC-2 Exam 201 (Linux Engineer) — Question 40

Due to extreme system use, a Linux system requires some additional swap space. To initialize 5 GB of additional swap space, which combination of commands should be used?

Answer options

Correct answer: C

Explanation

The correct answer, C, properly creates a swap file, initializes it with mkswap, and then activates it with swapon. Option A incorrectly attempts to mount the swap file instead of activating it. Option B skips the initialization step with mkswap, rendering the swap space unusable. Option D incorrectly uses the touch command, which does not create a valid swap file, and option E does not allocate sufficient space for 5 GB.