-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux nohup Guide
Mattscreative edited this page Dec 5, 2025
·
3 revisions
Complete beginner-friendly guide to nohup on Linux, covering Arch Linux, CachyOS, and other distributions including running processes in background, preventing hangup, and long-running tasks.
Basic usage:
# Run command with nohup
nohup command &
# Continues running after logoutDefault output:
# Output goes to nohup.out
nohup command &
# Creates nohup.out filePersistent process:
# Long running command
nohup ./long-script.sh &
# Continues after terminal closesRedirect output:
# Custom output file
nohup command > output.log 2>&1 &
# Redirects to output.logRedirect stdout:
# Redirect output
nohup command > output.log &
# Saves output to fileInclude errors:
# Include errors
nohup command > output.log 2>&1 &
# 2>&1 redirects stderr to stdoutRun in background:
# Background with nohup
nohup command &
# & runs in background
# nohup prevents hangupVerify running:
# Check process
ps aux | grep command
# Verify process is runningCheck installation:
# nohup is part of coreutils
# Usually pre-installed
# Check nohup
which nohupThis guide covered nohup usage, background processes, and long-running tasks for Arch Linux, CachyOS, and other distributions.
- jobs Guide - Job control
- bg Guide - Background jobs
- Process Management - Process management
-
nohup Documentation:
man nohup
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.