Solved

want to start my program in the background.

Posted on 2004-04-29
3
584 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

623 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