What is the default password of screen?

The screen password has always been simply the system password of the user running it in my experience. the manpage says that if there's a screen lock program available, it will be used if configured so. So maybe you would need to figure out if this is the case, and how that program behaves.


I sometimes find myself in the same situation, on servers where I have SSH public-key login and thus no password at all (that I know), and struggle to remember what I did last time to recover.

There is no need to kill the screen. Just disconnect the terminal you are running screen in, then open a new terminal window and reattach (screen -r).

Maybe as a precaution, add bind x to your .screenrc so that the lock keystroke is unbound. In an already running screen, use ctrl-A : bind x.


the password of the user that owns the screen process.


After trying many approaches, I found that:

  • The BEST solution is adding two lines bind x bind ^x to your .screenrc file.

(Note If you are not root user, remember to add alias screen="screen -C [your .screenrc file path]" to your .bashrc file)

  • The second BEST solution is adding one line export LOCKPRG='/bin/true' to your .bashrc file. However, this method is somewhat uncommon, refer to this link

At last, thanks a lot to this guy disabling_gnu_screen_lock_screen, I just copy-paste his content here.