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

WordPress Multi-site with Single Sign On (SSO)

Step 1: Login Access the correct environment using wp_admin login with the DevOps standard password:…

How To Install Microsoft Edge on Ubuntu / Debian / Linux Mint

Step 1: Add Microsoft Repository curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpgsudo install -o root…

PowerShell: Probe Remote Machine for Its OS Type

function probeOsType($server){ $ping=test-connection $server -count 1 $ttl=$ping.ResponseTimeToLive $osType=switch($ttl){ {$_ -le 64} {"Linux"; break} # MacOs…