Solved

want to start my program in the background.

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now