To navigate to the starting and end of a command, I usually use Ctrla and Ctrle.

However, when I work within a GNU screen, those keybinding do not work becuase perhaps they are being used by the GNU screen. Is there another way to move to the starting or the end of the command?

I am on CentOS6.2


3 Answers 3


Ctrl-A followed by the letter 'a' will send the Ctrl-A sequence to the shell.

Or you could map the screen command key to something other than Ctrl-A


The default readline binding for beginning-of-line is Ctrla. As this conflicts with screen's command prefix, you can either rebind the screen prefix, as suggested by Johnny, or include another binding in your .inputrc to map the readline behaviour to another keybind, for example to map the same behaviour to Alta, you could use:

"\ea": beginning-of-line

This will allow you to use either Ctrl or Alt a outside of screen and Alta within.

All of the readline bindings can be customized for both Emacs (the default) or vi mode.

A full list of all of the readline commands is availbale here: http://linux.about.com/library/cmd/blcmdl3_readline.htm


As others have said, Ctrl-a is often used by emacs and the shells' emacs mode. What I generally do is use screen's escape command to set the key sequence to Ctrl-z. Most of the time, I'm not looking to stop a program only to run another - for that, I open a new screen window and run the program. When I do, it is easy enought to type Ctrl-z z. Also, I very often ssh to other systems and run screen there, where I might use Ctrl-a as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .