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 Run OpenMediaVault with Pass-through Disks in VMWare ESXi

Assumptions: 1. The ESXi host in this lab is available with three (3) 1TB hard…

Linux: How to Check Graphics Card Memory

List all the PCI devices: lspci # Sample Outout:root@kim-linux:/home/kim# lspci00:00.0 Host bridge: Intel Corporation Device…

Adding Repositories in Centos 5.3

yum install yum-priorities vim /etc/yum/pluginconf.d/priorities.conf ---- [main] enabled=1 ----   Install RPMForge: cd /home wget…