How to run background command with nohup

Problem

redis-server
redis-cli

Solution

redis-server &
nohup redis-server &
cat nohup.out
nohup redis-server redis.conf &
nohup redis-server redis.conf >/dev/null 2>&1 &
nohup redis-server &
redis-cli
nohup redis-server &
echo $! > /tmp/redis-server.pid
kill $(cat /tmp/redis-server.pid)

Script

Demo

--

--

--

remarkablemark.org

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

InsurAce.io August Updates — Community Information Pack

Building A Simple Voice Assistant for Your Mac in Python

radigm (object oriented, functional), preferences on the aspects of application and systems…

How To Describe a Defect So Everyone Could Understand (+ Bonus Tips)

What is mongodb aggregation ?

Boost your Mac typing speed with text substitution

Building a deep learning machine

Simple Android Architecture : MVVM concept and reduce boilerplate code on…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
remarkablemark

remarkablemark

remarkablemark.org

More from Medium

How to write good status pages for Load Balancers

Repository Pattern Prisma ORM

The Admin Dashboard Saga

Resiliency patterns for cloud-based applications — Part I