What command is used to view a swap space element's type, name, and priority?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

The command that is used to view a swap space element's type, name, and priority is the one that specifically gathers detailed information about swap devices. While "swapon -a" is generally used to enable all swap devices and files listed in /etc/fstab, it does provide information about the swap space when executed with certain flags.

However, the correct command to use for viewing the type, name, and priority of swap spaces is actually "swapon -s". This command displays a summary of all active swap spaces, showing their names, types, sizes, used space, and priorities clearly in a structured format.

Other commands listed do not directly provide the information regarding the details of swap spaces in the same way. The "swapctl" command is more relevant in *BSD systems and is used to control the operation of swap devices or files but does not work in all Linux distributions. The "free -m" command primarily shows the total, used, and free memory in the system, including swap memory, but does not give detailed information about individual swap spaces. Lastly, "mkswap" is used to set up a swap space on a device or file but does not display swap details.

Therefore, while "swapon -

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy