How to check if I’m in screen session?

You can look at the $STY variable (a variable set by the screen command). If it is not “” then you are in a screen session.

I am in screen

$ echo $STY 
29624.pts-1.iain-10-04
$

I am not in screen

$ echo $STY

$

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)