CompTIA Linux+ (XK0-004) — Question 87

A server is almost out of free memory and is becoming unresponsive. Which of the following sets of commands will BEST mitigate the issue?

Answer options

Correct answer: D

Explanation

The correct answer is D because the commands 'fdisk', 'mkswap', and 'swapon -a' are used to create and enable a swap space, which can help alleviate memory pressure on the server. The other options do not address memory management effectively; for instance, 'free' only shows memory statistics, while 'lsof' and 'lvcreate' are not relevant to directly freeing up memory.