1

A few days ago, my ubuntu console started printing '^A' whenever I hit 'CTRL+A', instead of moving the cursor to the start of the line as it did before. The same problem happens for 'CTRL+E', while the 'CTRL+Arrow' shortcuts behave as they should. However, if I log in to a remote machine via ssh, everything works fine. Unfortunately, I do not remember anything in particular which could have triggered this behaviour (I have not changed shortcuts, nor modified my '.bashrc' file, nor updated the system).

some useful information:

I am not using nor screen nor tmux or other terminal multiplexers;

joe@Zen:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan

joe@Zen:~$ echo $TERM
xterm-256color

joe@Zen:~$ ps -f -p$PPID
UID        PID  PPID  C STIME TTY          TIME CMD
joe      11539  1575  0 12:27 ?        00:00:04 /usr/libexec/gnome-terminal-server

joe@Zen:~$ echo $SHELL
/bin/bash

joe@Zen:~$ cat /proc/version
Linux version 5.3.0-62-generic (buildd@lcy01-amd64-018) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #56-Ubuntu SMP Tue Jun 23 11:20:52 UTC 2020

Thank you in advance if you give me some ideas about what could I try.

2
  • 1
    Try set -o emacs
    – roaima
    Jul 4 '20 at 10:53
  • @roaima Thank you very much, this actually solved the problem. I don't know when or why, but I probably messed up with vim. Jul 4 '20 at 11:10
2

I would suggest that you have inadvertently changed your line editing scheme from the default "emacs" to "vi".

You can reset this back with

set -o emacs

Or change it back to vi mode with

set -o vi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.