Questions tagged [nohup]

Run a command immune to hangups, with output to a non-tty.

61 questions
72
votes
6 answers

Run a nohup command over SSH, then disconnect

I want to execute a script, start.sh on a remote server which runs this: nohup node server.js & Naively, I call SSH like this: ssh myserver <
56
votes
2 answers

Differences between " & disown" and "nohup & disown"

This is my understanding about the usage of &, disown and nohup: : runs the process within the Terminal's current bash instance, in the foreground (i.e. the process is listed as a bash foreground job and stdin, stdout and stderr are still…
kos
  • 41,268
32
votes
5 answers

Bring nohup job to foreground

Consider the following nohup execution: nohup script.sh > script.out & Is there a way to log off the terminal, reconnect, bring the process back to foreground and interact with it using the keyboard?
Adam Matan
  • 12,919
19
votes
2 answers

What is the function of the nohup command?

I am a newbie in Ubuntu. I have learned a command nohup [command] - run immune to hangup signal I can't understand the meaning of "immune to hangup signal". What type of signal it is talking about? And please tell me how to use this…
16
votes
1 answer

How can I prevent nohup from creating the file ~/nohup.out?

I use the command $ nohup ... to start an application in the background so that I can close the terminal window afterwards. Upon execution it creates the file ~/nohup.out. Example: orschiro@x230:~$ nohup /bin/bash -c "sleep 15 && python3…
orschiro
  • 13,687
8
votes
4 answers

Keep a program running in terminal

So I am well aware of nohup and suffixing commands with & to ensure that they go into the background. However if I run a graphical application - sometimes using neither seems to do the job. So what can I prefix a program/command with to ensure…
Industrial
  • 1,748
8
votes
5 answers

Alternatives to nohup?

I've got an init.d script which I want it to work in the background, even when I quit from the terminal. However I've tried making it run in the background with nohup but had "no hope", because when I quit, by looking at the pstree I can see the PID…
3kstc
  • 349
8
votes
3 answers

How to delete logs automatically after a certain time and restart the process that fills up the log file?

Server is Ubuntu 16.04. I have a process running with nohup that logs into a local file. This file gets big enough to consume 100% disk space. To resolve this I have to kill the process first and then remove the log file. Then I restart the process.…
DEVCNN
  • 183
  • 1
  • 1
  • 6
7
votes
1 answer

Cannot install nohup command

I am trying to install the nohup command. When I run sudo apt-get install nohup I get: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package nohup What is the issue here?
6
votes
4 answers

How can I start a script in a minimised Gnome Terminal?

I can start a command in a new Gnome Terminal as follows: nohup gnome-terminal --window-with-profile=Background --command ls >/dev/null 2>&1& (Based on https://askubuntu.com/a/46630/7146 and https://stackoverflow.com/a/10708326/236081) However, I…
lofidevops
  • 21,912
5
votes
2 answers

Background process (nohup &) suspends/resumes when user logs out/logs in

Ubuntu Server 11.10 When a normal (non-root) user starts a process with nohup (nohup java ... &), when the user disconnects from the terminal (ssh) the process stops responding. When the user connects again, the process starts responding again. For…
pakman
  • 151
5
votes
1 answer

Launch application via ssh

I am new to SSH. I can connect to a remote computer. I can also launch an application on a remote computer and see its GUI on my screen. But I do not know how to launch an application without it producing output on my screen. I want to launch an…
0xDE4E15B
  • 187
5
votes
1 answer

Is there a way to append nohup output file?

I run my script with this command nohup python a.py > /var/log/a.log 2>&1& This is okay but every time I run this command /var/log/a.log file is truncated. Is there a way to append this file no matter what?
previous_developer
  • 150
  • 1
  • 1
  • 5
5
votes
2 answers

How can I fix nohup, byobu, tmux, screen, etc to not die when I disconnect from SSH?

I'm running KDE Neon which is Ubuntu 18.04 Bionic (LTS) with the latest KDE desktop packages on top of it. Since upgrading to this from Xenial I have lost the ability for processes to survive SSH session disconnects... specifically nohup, tmux,…
4
votes
1 answer

Is there a utility for hopping in and out of a CLI?

Lets say I've got a bit of server software. I start it up and it provides an interface on stdin/stdout that I can use to enter commands during runtime. I want to be able to start it up over SSH, exit the session, come back and hook right back into…
1
2 3 4 5