Be more efficient with screen
January 12, 2026
I’m a fan of app-misc/screen. If you have an alternative screen multiplexer, feel free to move along. If not, here is the most basic of introductions. First, install screen.
emerge -av app-misc/screen
Next, even before starting your first session, run the following to add a “caption” to the bottom of your sessions. Think of this like a status bar.
echo 'caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %{y}@%H %{r}%1`%{w}| %{g}%l %{w} | %{y}%m/%d/%Y %c %{w}"' >> /etc/screenrc
Great, now you can start your first session. Screen has a bunch of flags. The only screen command you’ll need (almost ever) is the following:
screen -DR
Great. look in the lower right-hand corner of your terminal. You should see something like: @HOSTNAME | 0.00 0.00 0.00 | DATE TIME. In the lower left-hand corner you should see 0 USER@HOSTNAME.
If you stop here, I would argue you’re still WAY ahead of where you were before screen. Why? If your connection drops for whatever reason, ssh back in and run screen -DR again – you’re back.
Commands
Screen commands look like this [ctrl-a][command] which is hit control and “a” together, then release, then type the command.
[ctrl-a][double quote] show windows
[ctrl-a] create new window
[ctrl-a][space] cycle to next window
[ctrl-a][d] detach from screen (and processes continue)
There you go. That should get you started.