nice command usage


nice – allows you to specify the priority of the processor to perform various tasks, the priority range is -20 to 19, where 19 is the lowest, if not specified, then the standard priority is 0. It is convenient, for example, when packing data into archives so that this task does not load the server or when you need to run a lot of processes, distributing the load, which takes up all the processor time.

How to Run A Command with a Given nice Value in Linux:

Here, we will look at how to prioritize the CPU usage of a program or command. If you have a very CPU-intensive program or task, but you also understand that it might take a long time to complete, you can set it a high or favorable priority using the nice command.

nice -n 19 command


  • If no value is provided, nice sets a priority of 10 by default.
  • A command or program run without nice defaults to a priority of zero.
  • Only root can run a command or program with increased or high priority.
  • Normal users can only run a command or program with low priority.
Change the Scheduling Priority of a Process in Linux

Linux allows dynamic priority-based scheduling. Therefore, if a program is already running, you can change its priority with the renice command in this form:

renice -n  -12  -p 1055

That’s all what We want tell you about the nice and renice command.

You can read more linux guides by link

Viva La Linux!

Leave A Comment