Posted On December 1, 2020

Linux: Init Process in the Background and Detach

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Linux: Init Process in the Background and Detach
# Define program
program=remmina

# Method 1
nohup $program &

# Method 2
$program &
disown -h %1 # assuming jobs return [1] as the id

# Method 3
$program </dev/null &>/dev/null &

# Checking
kim@kimlinux:~$ jobs
[1]-  Running                 remmina &
[2]+  Done                    $program < /dev/null &> /dev/null

# Stop program abruptly
pkill $program

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Linux: An Experience in Resizing a Root Partition

Scope: These instructions are intended for Linux systems without Logical Volume Manager (LVM). For that…

Linux: Shell Script to Reboot Remote Devices Daily

Set Variables remoteDevice=900.468.20.1username=adminpassword="PASSWORDHERE" Install sshpass if it doesn't exist if ! sshpass -v sshpass &>…

How to Install NoVNC with x11vnc on Linux Mint 21

Objectives: Install x11vnc as the service that would allow connections to screen 0, console session…
Other project: DragonCoin.com