Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"All problems in computer science can be solved by another level of indirection" David J. Wheeler

Tmux/Screen provides an extra redirectable abstraction layer over the terminal device.

The biggest complaint I regularly see about it is that people are used to the screen keybindings. I wonder why not add an abstraction layer there, where keypresses really call commands that perform the actions, and you could reconfigure these.

This is how Emacs has done it for 30 years...



But (a) screen still exists right?, (b) byobu, (c) tmux allows one to remap the keys however one likes.


> The biggest complaint I regularly see about it is that people are used to the screen keybindings.

That's my problem with Tmux. Ctrl-a,d is already burned into muscle memory, and for my applications Screen is "good enough".


1. start tmux

2. in the first shell you get run:

    tmux set-option prefix C-a
3. now your prefix is C-a like in screen.

Permanentize it by changing tmux.conf :)


Beyond the other answers telling you to remap the prefix key: tmux used to come with an example configuration file that maps to the screen defaults:

    https://github.com/tmux/tmux/commit/2a1bb9#diff-fefa423d67264099ae82d4d2f5422b09
However, it appears that they have removed it at the beginning of the year. At least it's still in the commit history.


in your .tmux.conf

  set -g prefix C-a
  unbind C-b
  bind C-a send-prefix


Tmux expects you to rebind its leader to Ctrl-a once you're ready to move off of screen. Otherwise, it's default works nicely if you are nesting screen inside of Tmux or vis-versa


I use Ctrl-a as the "go back to beginning of line" shortcut that Readline-capable programs offer by default [1]. That's actually one reason I never got used to Screen ;)

[1] that is, using the Emacs keybindings it exposes by default. I know you can change that through .inputrc


I'm using Ctrl-a on tmux, and to get back to beginning on line I just have to press it twice Ctrl-a Ctrl-a.


That is how it is done.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: