Last Updated: February 15, 2019
·
738
· derekchinn

How can I tell if I'm currently in a screen session?

echo $STY

If "" is returned, you're not in a screen. If something else is returned (i.e. the screen name), you're in a screen.