CompTIA Linux+ (XK0-005) — Question 222
An administrator needs to increase the system priority of a process with PID 2274. Which of the following commands should the administrator use to accomplish this task?
Answer options
- A. renice -n -15 2274
- B. nice -15 2274
- C. echo "-15" > /proc/PID/2274/priority
- D. ps -ef | grep 2274
Correct answer: A
Explanation
The correct command is 'renice -n -15 2274' because 'renice' adjusts the priority of an already running process. The 'nice' command (option B) is used to set the priority of a new process at launch, while option C is incorrect because writing directly to /proc does not change the priority. Option D simply lists processes and does not alter any process priority.