XK0-004 Commands Practice Questions
The free XK0-004: CompTIA Linux questions that deal with commands, with answers and explanations. The full bank and the timed practice test cover every topic the exam asks about.
Question #1
A Linux administration is using a Linux system as a router. During the tests, the administrator discovers that IP packets are not being sent between the configured interfaces. Which of the following commands enables this feature for IPv4 networks?
Correct answer: B
Explanation
IPv4 forwarding is toggled through the file /proc/sys/net/ipv4/ip_forward, so writing 1 into it lets the router pass packets between interfaces; ip_route and ip_net are not forwarding parameters.
Question #3
A systems administrator needs to append output of ls –lha /opt command to the contents of a test.txt file. Which of the following commands will accomplish this?
Correct answer: C
Explanation
The >> operator appends command output to the existing file, whereas > overwrites it and < and << redirect input instead.
Question #8
A systems administrator wants to know the current status of a series of dd jobs that were started in the background three hours ago. Which of the following commands will achieve this task?
Correct answer: D
Explanation
killall -USR1 dd sends SIGUSR1, which makes each dd process print its progress to the terminal, revealing the current status of the background jobs.
Continue with XK0-004: CompTIA Linux
Unlock the full question bank
You have read the first 10 questions. A subscription opens every question in XK0-004: CompTIA Linux, the full timed practice test, and your progress and weak-topic reporting.
Single exam
$19.99for 30 days
Full question bank and practice test for one exam, for 30 days.
Single exam
$49.99for 1 year
One exam for a full year. Nothing renews and nothing to cancel.
Full access
$39.99/mo
Every exam in the catalogue, month to month.
Full access
$199.99/yr
Every exam in the catalogue for a year.
Already subscribed? Sign in to pick up where you left off.
