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

How To Create a 64-bit Linux Bootable USB Thumb Drive with 32-bit UEFI Compatibility

Part 1: Making the USB Booting Thumb Drive Download Rufus: https://rufus.ie/ Download Linux ISO -…

How to Check System Temperature on Ubuntu 21.04

# Install sensors sudo apt update -y sudo apt install lm-sensors hddtemp -y # Setup…

Lubuntu 20.04 – Enable SSH

# Install sshd sudo apt install ssh -y sudo systemctl enable --now ssh # Configure…