Latest LQ Deal: Linux Power User Bundle
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 06-22-2006, 03:21 PM   #1
LQ Newbie
Registered: Jun 2006
Posts: 3

Rep: Reputation: 0
SSH forked process

I need to login to my linux box at a remote location, create a job running

e.g. on my gentoo box i may wish to set off:

> emerge --update --deep world

I then need to close the terminal and leave it to finish doing it's stuff without me logged in.

Is this possible?


Old 06-22-2006, 03:40 PM   #2
Senior Member
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
I would suggest you create a cron job to do it.

If you go here:
there is a pretty good explanation of how to use it. You can delete the job the next day if you want.

I would say if you opened an SSH session and used the '&' after the command which makes the command run in the background, it will end once you end your ssh session.
Old 06-22-2006, 03:50 PM   #3
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 417Reputation: 417Reputation: 417Reputation: 417Reputation: 417
Check out using the screen command. Essentially you use screen to create a virtual terminal that stays running. You can get out of the running screen, close ssh and the screen will be unaffected. Next time you log in, you re-attach the screen and you're good to go. Sort of like VNC for command line.
Old 06-22-2006, 03:57 PM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Another option is to use the nohup command.
Old 06-23-2006, 02:24 AM   #5
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.3
Posts: 17,548

Rep: Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423
Yep, the traditional (& prob simplest) method is:
nohup <yourprog_and_params> &
Old 06-23-2006, 02:49 AM   #6
LQ Newbie
Registered: Jun 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Great! loads to go at hear, thanks for the advice guys, much appreciated.



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
open a process from ssh rino.caldelli Linux - Security 3 03-14-2006 10:22 PM
ssh-agent process buildup nifflerX Linux - General 4 03-09-2006 09:23 AM
Conectiva 10 Forked thorn168 Conectiva 0 09-07-2005 10:58 AM
ssh-agent process not killed Notwerk Fedora 0 06-20-2005 07:07 AM
how to connect forked process to a specific terminal pcweirdo Linux - Software 2 02-22-2005 03:17 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:01 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