the nice command allows you to change the priority of a process (that isn’t already running) while the renice command allows you to change the priority of a process that’s already running
note: you cannot change the priority of a running process using nice
both take values from -10 to 19 and the lower the value the higher the priority
the default value for any running process is 0
any user can increase the value of a process (slow it down) but it requires root access to decrease it (make it faster)
and finally you have to know the PID of a process in order to change its priority using the renice command
An example of renice command is as follows:
renice -5 -p 3434
this will set the priority of process id no 3434 to -5, which will inturn increase its priority over others
An examples of the nice command is as follows:
nice -n 11 <command name>