linux nohup
时间: 2023-10-17 21:34:15 浏览: 114
Nohup is a command in Linux that stands for "no hangup." It allows you to run a command or script in the background even after you log out or terminate your terminal session. By using nohup, you can ensure that the process continues running even if your terminal connection is lost.
To use nohup, you can simply prefix your command with "nohup" followed by the command you want to execute. For example:
```
nohup your_command &
```
The "&" symbol at the end helps run the command in the background, allowing you to continue using the terminal. By default, nohup redirects the output to a file called "nohup.out" in the current directory. You can specify a different file using the output redirection operators.
Remember that even though nohup lets the process continue running, it doesn't provide any additional functionality for process management. You may still need to use tools like 'ps' or 'kill' to manage and monitor the background process.
阅读全文