-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux fg Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to fg on Linux, covering Arch Linux, CachyOS, and other distributions including bringing jobs to foreground, job control, and process management.
fg (foreground) brings jobs to foreground.
Uses:
- Foreground job: Bring job to foreground
- Job control: Control background jobs
- Process management: Manage processes
- Interactive jobs: Work with interactive jobs
Why it matters:
- Job control: Control background jobs
- Interactive use: Use interactive programs
- Process management: Manage processes
Basic usage:
# Bring job to foreground
fg
# Brings most recent jobJob number:
# Bring specific job
fg %1
# Or
fg 1
# %1 = job number 1Background to foreground:
# List jobs
jobs
# Bring to foreground
fg %1Resume stopped:
# Resume stopped job
fg %1
# Continues job in foregroundReference jobs:
# Job numbers
fg %1 # Job 1
fg %2 # Job 2
fg %+ # Most recent
fg %- # Previous jobCheck jobs:
# List jobs first
jobs
# Verify job number existsThis guide covered fg usage, job control, and foreground process management for Arch Linux, CachyOS, and other distributions.
- bg Guide - Background jobs
- jobs Guide - List jobs
- Process Management - Process management
-
fg Documentation:
man fg
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.