Solved

want to start my program in the background.

Posted on 2004-04-29
3
583 Views
Last Modified: 2010-04-20
i know how to start a program..

i just ssh in and go to the that directory and type ./start.sh

however, i need this program to run in the background b/c
when i killed my telnet program, i want this program continue to run.

what should i do??
0
Comment
Question by:bionicblakey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
jainrah earned 500 total points
ID: 10955117
the following command should do the job for you.

program_name & nohup

& : to make it run in the background
nohup : ti continue running it even after you logout.

hope this helps.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 10955191
You can use nohup to do the job, the syntax should be

nohup /path-to/program &

man nohup

Or use the "screen" program to do the job, have a look at the following page for more
details: (you can download screen for your version of OS)
http://www.gnu.org/software/screen/
0
 
LVL 3

Expert Comment

by:tolgadalkilic
ID: 10955577
addition to yuzh's answer:

you can use some extra strings when you backgrounded your program to not to fill your login window with error or output messages from the program that you are running:

nohup /path-to/program 2>/dev/null 1>/dev/null&

2 and 1 are meaning that pipe the output and error messages to /dev/null
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Real Time Memory on Distinct 24 Cycle 7 60
Moving from Mcrypt to OpenSSL 18 75
Internal CA server 6 134
How to fix Dual Server Conflict GitLab vs Apache2 3 58
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question