In bash I can hit Ctrl + a and go to first of the command line.
But in screen
Ctrl + a does not do this. How do I go to first of command line in screen?
In bash I can hit Ctrl + a and go to first of the command line.
But in screen
Ctrl + a does not do this. How do I go to first of command line in screen?
You can press Ctrl+a followed by a to go to the beginning of the line. The a sends a Ctrl+a to the terminal.
Take a look at this Q&A from SuperUser, titled: Bash vs. Gnu screen : Replace Ctrl-A with Ctrl-Shift-A. There are several options but the easiest would be to remap Ctrl+aCtrl+a to something else for screen
so that Ctrl+a can be freed for use by Bash.
excerpt from one of the answers
By default, C-a C-a is bound to the other command (switch to most recently active screen) in screen. To have C-a C-a send an actual C-a and have C-a o switch windows, put the following in your .screenrc:
escape ^A^A bind o other
As @jordanm has pointed out in the comments. The above solution isn't necessary, however. The 2nd highest upvoted answer to that same Q&A states that you can simply type Ctrl+a+a and screen
will send a Ctrl+a to Bash.
C+a
. Is there any shortcut specific to screen
?
– Mohsen
Aug 07 '13 at 04:08
set -o vi
:Space
(if you are in insert mode)0
. Done :) – jasonwryan Aug 07 '13 at 04:33escape ^\\\
(Ctrl+backslash, press backslash again to send a literal chr(28)) – Gilles 'SO- stop being evil' Aug 07 '13 at 22:41