Am I Inside A Screen Session?

Check

$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:

vinay@dev ~ $ echo $STY vinay@dev ~ $

If you are in screen:

vinay@dev ~ $ echo $STY 2026.pts-0.ip-10-0-1-71

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: