Windows
Linux
PowerShell Equivalents
Processes
Windows PowerShell Start-Process equivalent in Linux
Launches a program in the background and optionally keeps it running after the terminal closes.
Windows
→
PowerShell Start-Process
Linux equivalents
nohup command > output.log 2>&1 &
nohup command > output.log 2>&1 &
nohup command > output.log 2>&1 &
Overview
What this command does
Launches a program in the background and optionally keeps it running after the terminal closes.
Migration tip: A trailing
& backgrounds a process. nohup also protects it from the terminal hangup signal.Practical tasks
Common use cases
Start a detached process
Launches a program in the background and optionally keeps it running after the terminal closes.
firefox &
Start an application in the background
nohup long-command > output.log 2>&1 &
Keep a command running after logout
jobs -l
List jobs started by this shell
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
firefox &
nohup long-command > output.log 2>&1 &
jobs -l
Walkthrough
Examples with explanations
firefox & # start a background application
nohup long-command > output.log 2>&1 & # detach a long-running task
jobs -l # list shell jobs
Reference
Common options and variations
| Command or option | Use |
|---|---|
firefox & | Start an application in the background |
nohup long-command > output.log 2>&1 & | Keep a command running after logout |
jobs -l | List jobs started by this shell |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | nohup command > output.log 2>&1 & |
Same command on this distribution. |
| Fedora | same command | nohup command > output.log 2>&1 & |
Same command on this distribution. |
| Arch | same command | nohup command > output.log 2>&1 & |
Same command on this distribution. |
Important
What to watch out for
Backgrounding does not automatically make a production service reliable. Use a systemd service for persistent managed workloads.
Keep learning