Start·Terminal-Befehle

nohup

Prozesse und System

Aufruf

nohup <command> [args] &

Lasst einen Befehl das Hangup-Signal ignorieren, damit er das Abmelden ubersteht; er wird dabei nicht in den Hintergrund geschickt — das `&` setzen Sie selbst, und die Ausgabe sammelt sich still in ./nohup.out.

Häufige Optionen

OptionBedeutung
&You add this yourself: nohup alone does not put the command in the background.
> out.log 2>&1Send output somewhere other than the default ./nohup.out.
< /dev/nullDetach stdin as well, so the command cannot stall waiting for input.

Beispiele

nohup ./server.sh > server.log 2>&1 &

Start the server so it survives logout, with its own log file.

nohup make -j4 &

Run a long build that keeps going after you disconnect; output lands in nohup.out.

Was läuft und was die Maschine frisst. Erst herausfinden, was es ist, dann beenden.

So liest man das

  • Eckige Klammern [ ] markieren einen Teil, den man weglassen kann.
  • Drei Punkte … heißen: mehrere sind erlaubt.
  • Optionen achten auf Groß- und Kleinschreibung — bei manchen Befehlen sind -r und -R verschieden.

Häufige Fragen

Q. Was macht nohup?

Lasst einen Befehl das Hangup-Signal ignorieren, damit er das Abmelden ubersteht; er wird dabei nicht in den Hintergrund geschickt — das `&` setzen Sie selbst, und die Ausgabe sammelt sich still in ./nohup.out.

Q. Wie gibt man ihn ein?

nohup <command> [args] & — eckige Klammern markieren, was wegfallen darf.

Q. Wie viele Optionen lohnen sich?

Hier stehen 3; die vollständige Liste steht in man nohup. Der Befehl gehört zu Prozesse und System.

Verwandte Befehle

man-Seite: man nohup