0

I have a longer running sudo (or su) command that needs to continue to run even if the user who initially invoked the command logs out.

Obviously sudo sleep 60 & killall --user $USER also kills the sleep-command, as it's a child of my tmux/zsh process:

# pstree -s `pidof sleep`
systemd───tmux───zsh───sudo───sleep

How can I "lift" that command into the actual root process hierarchy - or make it persist the logout in any other way?

user569825
  • 2,369
  • 1
  • 25
  • 45

1 Answers1

1

Use nohup or make another tmux window.

wRAR
  • 25,009
  • 4
  • 84
  • 97
  • Thanks. `nohup` works. Using another tmux session would fail, as I run `killall --user ${USER}`. I updated the question accordingly. – user569825 Sep 02 '14 at 12:28