nohup Linux Command
nohup Linux command
In this tutorial, we will learn the nohup Linux Command. nohup stands for no hang-up signals. We use this command to run servers in the background ( & ) and continue to run even after exiting the Terminal or Konsole.
Command Syntax
We use this nohup to run a command and ignore hang-up signals. We are making the command that we run immune to hang-up signals. Additionally, we can redirect or append the output to the ‘nohup.out’ file.
To know the help documentation, type the help command switch or the man page for the command.
$ nohup –help
To see the man page, type:
$ man nohup
Examples
# Starting Application Server
Let’s see an example usage of the command. We will use the nohup command to start the JBoss application server and redirect the output to the nohup.out file.
$ nohup ./standalone.sh & > nohup.out
standalone.sh is the JBoss standalone server startup script to start the server in standalone mode. & will make the application server process run in the background. nohup will make the server immune to signals. We can notice that the server continues to run even if we exit the Terminal or even if we log out from the system.
$ tail -f nohup.outÂ
With this command, we are just checking the JBoss application server boot process for any Errors or Exceptions during the startup process.
# Run Selenium Grid in Background
# Spin Docker containers
Spin multiple Docker containers with the nohup command using the Docker compose tool. The containers run in the background, immune to signals.
More Information:
Docker Compose tool:
Selenium Grid with Containers:
That’s it.
Linux Commands
Linux Basic Commands Tutorial page:
More Information on Ubuntu Linux: