In its simplest terms, the nice command is used for manipulating process niceness with regard to CPU resource availability. When we say niceness in this context, this is referring to the attention or priority given to a particular process for the CPU resources. We can increase or decrease priority for a given process. This becomes relevant whenever the CPU is being bogged down by a number of processes, each fighting for its own attention. By changing the niceness for a particular process, we are affecting the process scheduling.
We can view the current nice value for processes using the ps command. Here, we would pass the al option:
root@ubuntu:/home/philip# ps -al
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 2423 2271 0 80 0 - 13698 poll_s pts/17 00:00:00 sudo
4 S 0 2437 2423 0 80 0 - 13594 wait pts/17 00:00:00 su
4 S 0 2438 2437...