What is the difference between the two commands nice and renice to manage process priority?

  • 3
    Please take the time to read the relevant man pages before posting a question. The first lines of man nice and man renice would have given you your answer. – terdon Feb 28 '16 at 18:44

nice launches a new command with a modified nice level (lower priority than it would have otherwise had, or higher priority if you have permission). You specify which command to launch by providing it as an argument to nice itself. nice actually execs that command, so nice itself doesn't terminate until the command does.

renice changes the priority of an existing running process, then terminates immediately. You specify which process by giving its PID (as well as the new desired nice level) as an argument to renice.

Note also that nice takes a relative nice level (i.e. less or more than before) whereas renice requires an absolute level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.