When using screen in linux, how can I tell if I'm in a screen or not?
I could do
$STY. If it's null, you're on a "real" terminal. If it contains anything, it's the name of the screen you're in.
If you are not in screen:
eric@dev ~ $ echo $STY eric@dev ~ $
If you are in screen:
eric@dev ~ $ echo $STY 2026.pts-0.ip-10-0-1-71