nerdexam
Linux_Foundation

LFCS · Question #806

Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct?

The correct answer is B. /usr/bin/prog is executed with a nice level of 5. This question tests understanding of the nice command and how its arguments affect the nice level of a process.

Submitted by saadiq_pk· Apr 18, 2026Essential Commands

Question

Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct?

Options

  • A/usr/bin/prog is executed with a nice level of -5.
  • B/usr/bin/prog is executed with a nice level of 5.
  • C/usr/bin/prog is executed with a priority of -5.
  • D/usr/bin/prog is executed with a priority of 5.

How the community answered

(26 responses)
  • B
    96% (25)
  • C
    4% (1)

Why each option

This question tests understanding of the `nice` command and how its arguments affect the nice level of a process.

A/usr/bin/prog is executed with a nice level of -5.

Executing with a nice level of -5 would require `nice -n -5`, and generally needs root privileges; `nice -5` as provided means to add 5 to the nice value.

B/usr/bin/prog is executed with a nice level of 5.Correct

When `nice` is used with a positive number, such as `nice -5`, without the `-n` option, it is interpreted as `--adjustment=5`, meaning it adds 5 to the program's default nice value (which is 0). Therefore, `/usr/bin/prog` will be executed with a nice level of 0 + 5 = 5, assigning it a lower scheduling priority.

C/usr/bin/prog is executed with a priority of -5.

Nice levels are an input to the scheduler that *influence* priority, but are not directly the priority value itself; a nice value of 5 means a *lower* scheduling priority, not a priority of -5.

D/usr/bin/prog is executed with a priority of 5.

Nice levels are an input to the scheduler that *influence* priority, but are not directly the priority value itself; a nice value of 5 means a *lower* scheduling priority, not a priority of 5.

Concept tested: Linux `nice` command nice levels

Source: https://man7.org/linux/man/man1/nice.1.html

Topics

#nice command#process scheduling#command arguments

Community Discussion

No community discussion yet for this question.

Full LFCS Practice