LFCS Essential Commands Practice Question
Which THREE commands can change the priority of an already running process?
⚠ Common exam trap
Many candidates confuse `nice` (which only sets priority for new processes) with `renice` (which modifies running processes), or mistakenly think `kill -STOP` changes priority when it actually halts the process.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
top (press 'r')
Option B (top, press 'r') is correct because within the interactive top utility, pressing 'r' prompts for a PID and a new nice value, allowing you to renice an already running process on the fly. Option C (chrt) is correct because chrt sets or changes the scheduling policy and real-time priority of a running process by PID (e.g., chrt -p -f 10 <pid>), directly altering its priority attributes. Option E (renice) is correct because renice is specifically designed to change the nice value of one or more running processes (renice -n 5 -p <pid>), which adjusts their CPU scheduling priority. Option A (kill -STOP) is incorrect because it only suspends a process with SIGSTOP and does not modify its priority. Option D (nice) is incorrect because nice only launches a new command with a specified nice value; it cannot change the priority of an already running process.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
kill -STOP
Why it's wrong here
kill -STOP suspends execution, it does not alter priority.
- ✓
top (press 'r')
Why this is correct
Pressing 'r' inside top prompts for a PID and a nice value, then calls setpriority() on that running process. This satisfies the stem's requirement to alter priority of an already running process, unlike commands that only set priority at launch.
- ✓
chrt
Why this is correct
chrt sets a process's scheduling policy and real-time priority via sched_setscheduler(), targeting an existing PID. This satisfies the stem's requirement to change priority of an already running process, though it alters scheduling class rather than nice value.
- ✗
nice
Why it's wrong here
nice sets the priority only when launching a new process; it cannot alter an already running one. It would be correct for starting a command at a chosen niceness, whereas renice changes a live process's priority.
- ✓
renice
Why this is correct
`renice` alters the nice value of one or more running processes, identified by PID, process group or user, satisfying the requirement to change priority after a process has already started. Unlike `nice`, which only sets priority when launching a new command, `renice` adjusts scheduling priority of existing processes.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 406-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.