In this tutorial, we will learn 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.
nohup Linux command
We use this nohup to run a command and ignore hang-up signals. Basically, we are making the command that we run immune to hang-up signals. Additionally, we can redirect or append the output to ‘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
# 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 nohup command using Docker compose tool. The containers run in the background immune to signals.
Docker Compose tool:
Selenium Grid with Containers:
Linux Basic Commands Tutorial page:
More Information on Ubuntu Linux: https://ubuntu.com/