The "screen" refers to a program mentioned in How to reconnect to a disconnected ssh session . That is a good facility.
But there is a question I'd really like to know. How do I know whether I'm running inside a "screen"? The difference is:
- If yes, I know I can safely close current terminal window, e.g., close a PuTTY window, without losing my shell(Bash etc) session.
- If no, I know I have to take care of any pending works before I close the terminal window.
Better, I'd like this status to be displayed in PS1 prompt so that I can see it any time automatically.