Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-08-2008, 10:51 AM   #1
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 89

Rep: Reputation: 16
launch a long running process at startup

I want to launch tcpdump at startup on my router. If I run it from a script, the script will never stop (is this an issue?), and I won't be able to see tcpdump end messages in a terminal, if I want to. With screen, I don't know how to run a command in it automatically.

Any advice?

Thank you for your great site.
Old 09-08-2008, 12:48 PM   #2
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,186

Rep: Reputation: 52
run it in a startup script with the "&" at the end.
This puts it in the background, and allows the script to continue without waiting for the program to return.
tcpdump &
Old 09-10-2008, 02:03 AM   #3
Registered: Sep 2008
Distribution: Ubuntu 8.04 LTS Server
Posts: 89

Original Poster
Rep: Reputation: 16
Thank you for your answer. It works.

I also used "screen -d -m command" to start tcpdump in a screen, but it is more complicated than running it in the background, and still I can not see the tcpdump statistics, because the screen terminates immediately after tcpdump, as it is normal to do.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script : Kill a running process when another process starts ashmew2 Linux - General 3 08-20-2008 03:47 AM
Can kernel kill long-running process? registering Linux - Kernel 5 07-20-2007 08:45 AM
Grub takes a LONG time to launch. FrankRizzo Linux - Software 9 01-25-2007 11:21 PM
How does one launch programs 'out of process' in a terminal window? DKnight Linux - General 5 06-07-2003 10:11 PM
running a process at startup jmu Linux - Newbie 5 02-11-2003 05:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration