Linux bg Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
⏸ Linux bg Guide
Complete beginner-friendly guide to bg on Linux, covering Arch Linux, CachyOS, and other distributions including sending jobs to background, job control, and background process management.
Table of Contents
Understanding bg
What is bg?
bg (background) sends jobs to background.
Uses:
- Background job: Send job to background
- Job control: Control jobs
- Process management: Manage processes
- Continue stopped: Resume stopped jobs
Why it matters:
- Job control: Control background jobs
- Multitasking: Run multiple jobs
- Process management: Manage processes
⏸ bg Basics
Send to Background
Basic usage:
# Send job to background
bg
# Sends most recent stopped job
Specific Job
Job number:
# Send specific job
bg %1
# Or
bg 1
# %1 = job number 1
Sending to Background
Resume Stopped
Resume in background:
# Resume stopped job in background
bg %1
# Continues job in background
Start Background
Start in background:
# Start command in background
command &
# Automatically runs in background
Job Control
Job Numbers
Reference jobs:
# Job numbers
bg %1 # Job 1
bg %2 # Job 2
bg %+ # Most recent
bg %- # Previous job
Troubleshooting
No Such Job
Check jobs:
# List jobs first
jobs
# Verify job number exists
Summary
This guide covered bg usage, job control, and background process management for Arch Linux, CachyOS, and other distributions.
Next Steps
- fg Guide - Foreground jobs
- jobs Guide - List jobs
- nohup Guide - Detached jobs
- bg Documentation:
man bg
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.