Linux: Command Runs The Process Behind The Scenes 'nohup'

 
The nohup name stands for "no hangup." The hangup signal (HUP), which is usually sent to the process to inform that the user has logoff or "hung", is intercepted by nohup, allowing the process to continue running.

╭─heriipurnama @ tesla ~
╰─ $ nohup
nohup command:nohup <command to run> &remember running command script without <> sign example:

╭─heriipurnama @ tesla ~ / Aplication / franz
╰─ $ nohup ./franz & 130 ↵
[2] 3456
nohup: ignoring input and appending output to 'nohup.out'

Sign & here enabled to run the program behind the scenes. When nohup runs automatically it will also create a file 'nohup.out' which this file is used to store the process the nohup does. [2] 3456 This is a sign indicating that the process is running on PID 3456. We can also see the running process that the nohup runs by using the command:

╭─heriipurnama @ tesla ~ / Aplication / franz
╰─ $ tail -f nohup.out
xdg-settings: default-url-scheme-handler not implemented for xfce

(franz: 6062): libnotify-WARNING **: Failed to connect to proxy
xdg-settings: default-url-scheme-handler not implemented for xfce

(franz: 6465): libnotify-WARNING **: Failed to connect to proxy
xdg-settings: default-url-scheme-handler not implemented for xfce
An instance of Franz is already running. Exiting ...

To stop the process by using the KILL command with the PID argument of the nohup, here it is assumed to stop the nohup process with PID 3456.

╭─heriipurnama @ tesla ~ / Aplication / franz
╰─ $ ps -a | grep 3456
 3456 pts / 0 00:00:11 franz


╭─heriipurnama @ tesla ~ / Aplication / franz
╰─ $ kill 3456
that's how to run the program behind the scenes without having to stop the process of the program nets on the terminal.
    Blogger Comment
    Facebook Comment

1 komentar:

Thanks For Your Feedback.