Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

Using "screen" in FreeBSD

Well a overview of screen is that it is used to keep a process going no matter what. The only thing that brings screen down, is the program it is running dies or root kills it or the box is rebooted. Screen is used to keep a program alive and you can log out and it will keep going and be waiting for you when you log back in.
1) Download the package from
I have put it up on my webserver for your convience. I have done this because I have found with the new screen it wigs out on me for 3.5-STABLE. But anyway. This screen should work on all FreeBSD. Enjoy =)
2) pkg_add it.. pkg_add /root/screen.tgz . I'm sure you get the idea.
3) To use screen now all you have to do is screen program.
So for example if you want to screen a BitchX then you do screen BitchX and when you want to leave it running you just close the terminal and screen will keep BitchX up and running like you where there, and when you want to reattach to that screen then you do screen -r under the same user you started the previous screen's.
If you have started more than one screen then it will come up with a list of dettached screens which can be resumed.
For example.
whisky@gatewaybsd:/usr/home/whisky$screen -r
There are several suitable screens on:
    53610.ttyp2.gatewaybsd (Detached)
    29450.ttyp0.gatewaybsd (Attached)
    53636.ttyp2.gatewaybsd (Detached)
Type "screen [-d] -r [pid.]" to resume one of them.
So in order to reattach to a screen you just do screen -r 53610
When you /quit or however the program exits the screen will die along with it. If this is not the case, you can use screen -wipe 53610

© 1997 - 20013 Defcon1, , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of and the content's original author.

Tool-Bar-2Defcon1  Webmail