TIL about the command `nohup`

Published: (December 23, 2025 at 10:48 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

What is nohup?

nohup stands for “no hang up”. It runs a process immune to the SIGHUP signal. When you close a terminal or log out, the shell normally sends SIGHUP to all running processes, causing them to terminate. Using nohup prevents this, allowing processes to continue running after the terminal is closed.

Example usage

nohup n8n start > n8n.log 2>&1 &
  • nohup prefixes the command to make it immune to SIGHUP.
  • > n8n.log redirects stdout to the file n8n.log.
  • 2>&1 redirects stderr to the same destination as stdout.
  • The trailing & runs the command in the background.

Reference

Back to Blog

Related posts

Read more »