# Is there a Linux equivalent to RDP?

**URL:** <https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902>\
**Category:** Factual Questions\
**Created:** [July 13, 2009, 9:21pm UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902 "2009-07-13T21:21:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaelghat](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@aaelghat](https://boards.straightdope.com/u/aaelghat)\
**Post date:** [July 13, 2009, 9:21pm UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902/1 "2009-07-13T21:21:24Z")

</div>

In the Windows world, I can log into a server using RDS (Remote Desktop Protocol) start a batch process on the server, disconnect from my session, and then log-in again later (maybe from a different computer) and see how things are doing.

Is there a Linux equivalent? I have a Linux server that I log into using Putty, but if I start a shell script, and then disconnect, doesn’t that stop the shell script from executing? Is there a similar thing I can do where I can start a long process, disconnect, and then sign back in later to see how it’s going?

I know about cron jobs, but I guess I was thinking something I could just run ad-hoc on the command line.

Thanks.

---

<div class="post-metadata">

**Author:** ![Simplicio](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@Simplicio](https://boards.straightdope.com/u/Simplicio)\
**Post date:** [July 13, 2009, 9:29pm UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902/2 "2009-07-13T21:29:28Z")

</div>

IIRC typing ‘bg [process number]’ at the command line will detatch the process from your session so you can log off and it will continue. ‘fg [process number]’ brings it back.

So you don’t need any special program, just anything that gives you access to the command line.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [July 13, 2009, 9:34pm UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902/3 "2009-07-13T21:34:28Z")

</div>

bg will put a command in the background (as if you had started it with an &) but it will still be terminated if you end your session. (In fact it will prevent you from logging out the usual way by complaining about stopped jobs.) To run a command that will survive the end of the shell, you can use [nohup](http://en.wikipedia.org/wiki/Nohup).

Alternatively, you can use [screen](http://en.wikipedia.org/wiki/GNU_Screen) to create a permanent, detachable terminal to which you can reattach on subsequent logins. That’s especially useful if you have a long-running process that you want to keep an eye on over the course of several login sessions.

---

<div class="post-metadata">

**Author:** ![Cleophus](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Cleophus](https://boards.straightdope.com/u/Cleophus)\
**Post date:** [July 13, 2009, 9:38pm UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902/4 "2009-07-13T21:38:01Z")

</div>

Sounds like [screen](http://www.rackaid.com/resources/linux-tutorials/general-tutorials/using-screen/) is the program you want. You can create multiple sessions in one terminal window, switch between them, and resume sessions after disconnecting.

---

<div class="post-metadata">

**Author:** ![aaelghat](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@aaelghat](https://boards.straightdope.com/u/aaelghat)\
**Post date:** [July 14, 2009, 3:02am UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902/5 "2009-07-14T03:02:17Z")

</div>

Excellent, and it looks like screen is already installed on my server (CentOS). Thanks for the advice everyone!!

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [July 14, 2009, 12:27pm UTC](https://boards.straightdope.com/t/is-there-a-linux-equivalent-to-rdp/502902/6 "2009-07-14T12:27:21Z")

</div>

You’ve got lots of options. Here are some:

[ul]  
[li]If the program you want to run will run happily in the background without any need for X or user interaction, you can use ssh with the -f option to run it.[/li][li]Use NoMachine NX – this will allow you to run X programs and disconnect from a running session without terminating it[/li][li]Use VNC – similar to NX, but not as fast or versatile. This will reproduce an entire desktop login session; again, you can disconnect from it without terminating it.[/li][/ul]
