commands
fg — foreground a job
Resume or move the specified job to the foreground of an interactive shell with job control. Waits for state change/completion; use only after checking jobs. Use a fresh private workspace, ordinary user and bounded child processes; no sudo.
Formal Syntax & Structure
linux syntaxlinux
fg [JOBSPEC]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| JOBSPEC | operand | shell job specification |
Return Value
exit status and output
Resume or move the specified job to the foreground of an interactive shell with job control. Waits for state change/completion; use only after checking jobs.
Working Example
Example Snippetlinux
# In a fresh interactive shell: start sleep 15, press Ctrl-Z, check jobs.fg %1