Control system responsiveness by moving jobs between the foreground and background, and by lowering CPU priority with nice. Validate your job state and apply priority changes in a controlled, operator-safe way.
The server feels sluggish during routine work, and you suspect a combination of interactive shells and CPU-heavy commands are competing for resources. You need to manage job state (foreground vs background) and reduce the priority of a noisy workload so the system stays usable while it runs.
Job control keeps you productive in a live shell session. Priority control helps you be a good citizen on shared systems without killing workloads that still need to finish.
nice
.
&
and tracking job IDs.
jobs
.
fg
and
bg
.
Ctrl+Z
.
nice -n
.
sleep 60 &
Appending
&
starts the command in the background and returns you to the
prompt. This is useful for long-running commands that do not
need your immediate attention.
Job [1] 1234 running in background.
jobs
jobs
reports tasks the current shell is tracking. This is job
control scope, not a full system process list.
[1]+ Running sleep 60 &
fg %1
fg
attaches the job to your terminal again.
To pause it without killing it, you can press
Ctrl+Z
which sends a stop signal and returns control to your shell.
sleep 60
(user presses Ctrl+Z to suspend it)
[1]+ Stopped sleep 60
bg %1
bg
continues a stopped job but keeps it in the background.
This is a clean way to let work finish while you keep using
the terminal.
[1]+ sleep 60 &
yes
will generate endless output. Redirect to
/dev/null
as shown, and treat this like a test workload you should
stop after confirming behavior.
nice -n 10 yes > /dev/null &
nice
starts a process with an adjusted scheduling priority.
A higher nice value typically means lower CPU priority.
This lets you run heavier workloads while reducing impact on
interactive tasks.
[2] 1245
sleep 60 &
: Runs a command in the background and returns to the prompt.
jobs
: Lists jobs managed by the current shell session.
fg %<job>
: Brings a job to the foreground (example:
fg %1
).
Ctrl+Z
: Suspends the current foreground job (stops it without terminating).
bg %<job>
: Resumes a stopped job in the background.
nice -n <value> <command>
: Starts a command with adjusted scheduling priority (higher nice typically lowers priority).
yes > /dev/null
: Generates continuous output redirected to null, commonly used as a simple CPU load test.