nerdexam
LPI

201-400 · Question #270

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

The correct answer is C. dd if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; mkswap /tmp/swapfile; swapon. See the full explanation below for the reasoning.

Question

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

Options

  • Add if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; mkswap /tmp/swapfile; mount
  • Bdd if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; swapon /tmp/swapfile
  • Cdd if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; mkswap /tmp/swapfile; swapon
  • Dtouch -5G /tmp/swapfile; swapon /tmp/swapfile
  • Emkswap /tmp/swapfile 512000; swapon /tmp/swapfile

How the community answered

(22 responses)
  • A
    18% (4)
  • B
    5% (1)
  • C
    73% (16)
  • E
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 201-400 Practice