bash

How to Use nohup

How to Use nohup

The nohup command allows you to run a script or command in the background, even after you log out from the terminal. This is particularly useful for long-running processes.

Basic Usage

To use nohup, simply prefix your command with it and redirect the output:

nohup ./your-script.sh > output.log 2>&1 &

Understanding Output Redirection

By default, nohup outputs to a file called nohup.out. You can redirect this to a different file using:

nohup ./your-script.sh > custom-output.log 2>&1 &

Checking the Process

To check if your process is running, you can use the ps command:

ps aux | grep your-script.sh
moin

Recent Posts

Dental Implants Cost in Ohio: Local Quote Guide

Compare dental implant costs in Ohio with a clear quote checklist. Check final teeth, extra…

2 days ago

Dental Implants Cost in Illinois: Local Quote Guide

Compare dental implant costs in Illinois with a clear quote checklist. Check final teeth, extra…

2 days ago

Dental Implants Cost in Pennsylvania: Local Quote Guide

Compare dental implant costs in Pennsylvania with a clear quote checklist. Check final teeth, extra…

2 days ago

Dental Implants Cost in North Carolina: Local Quote Guide

Compare dental implant costs in North Carolina with a clear quote checklist. Check final teeth,…

2 days ago

Dental Implants Cost in Georgia: Local Quote Guide

Compare dental implant costs in Georgia with a clear quote checklist. Check final teeth, extra…

2 days ago

Dental Implants Cost in Arizona: Local Quote Guide

Compare dental implant costs in Arizona with a clear quote checklist. Check final teeth, extra…

2 days ago

This website uses cookies.