Control responsiveness by moving jobs between the foreground and background, then reduce CPU impact with nice. Validate job state and apply priority changes without disrupting interactive work.
The server feels sluggish during routine work, and you suspect a mix of interactive shells and CPU-heavy commands are competing for resources. You need to manage job state (foreground versus 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 reduce impact on shared systems without killing work that still needs to finish.
nice.
sleep 60 &
Appending & starts the command in the
background and returns you to the prompt. This is useful
for work that does not require interactive input.
[1] 1234
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, press Ctrl+Z
to stop the job and return control to your shell.
sleep 60
[Ctrl+Z]
[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 generates endless output. Redirect to
/dev/null as shown, and treat this as a test
workload you should stop after confirming behavior.
nice -n 10 yes > /dev/null &
nice starts a process with an adjusted
scheduling priority. Higher nice values generally reduce
CPU priority so interactive tasks remain responsive.
[2] 1245
Job control only tracks processes started from the current shell. If the job was started in a different terminal or session, it will not appear here.
The job ID is shell-scoped. Re-run jobs and
use the correct job spec (for example %1).
Some programs handle signals differently, and some may ignore the terminal stop signal. Use the shell’s job list to confirm state and test with a simple workload first.
Nice affects CPU scheduling priority, not I/O or memory pressure. If the slowdown is from disk or memory, you need a different mitigation than nice alone.
Stop any test workloads you started so they do not continue consuming CPU after you finish the lab.
jobs
kill %1
kill %2
jobs returns no active jobs, and the terminal
remains responsive with no leftover test processes running.
sleep 60 &
: Runs a command in the background and returns control to the
shell.
&: backgrounds the command.jobs
: Lists jobs managed by the current shell session.
fg %<job>
: Brings a job to the foreground.
%<job>: job specifier from
jobs (for example %1).
bg %<job>
: Resumes a stopped job in the background.
%<job>: job specifier from
jobs (for example %1).
nice -n <value> <command>
: Starts a command with adjusted scheduling priority.
-n <value>: sets the nice value.yes > /dev/null
: Generates continuous output redirected to null, commonly
used as a simple CPU load test.
> /dev/null: discards output.kill %<job>
: Terminates a job tracked by the current shell.
%<job>: job specifier from
jobs (for example %2).