I was using readymade CentOS images for VirtualBox from VirtualBoxes CentOS images. I noticed that some of the images come with weird keyboard settings, such that you can’t use the pipe (passing information from command to command), dash (for command parameters), @ (email sign), etc keys. In other words, when you try to type these keys, other keys would appears and vice versa. All of these keys are crucial to running any commands on the CentOS server.
The problem is that the VirtualBox image stores the keyboard setting that was used when it was created. Since this server image was built in Italy, and I am located in the US, there were obviously key differences.
The obvious solution is to change it to your preferred keyboard layout. There are 2 ways of doing it:
- Easier way: Install system-config-keyboard through yum. The caveat is this will install 75+ other bloat packages that you probably don’t need. However the command
system-config-keyboardwould configure your keyboard for you.
yum install system-config-keyboard
- Advanced way: Use
command to change the keys temporarily and then make a change to
to make a permanent change (after restart).
loadkeys us # or your own locale vim /etc/sysconfig/keyboard # replace KEYTABLE value to your locale
5 thoughts on “VirtualBox Images CentOS keyboard settings problem”
Thanks much!! I had the same problem; I used your second method as I certainly didn’t want unnecessary stuff. Worked like a charm.
Thanks, Second option was easy enough.
Thanks a lot. This (2nd option) worked like a charm.
Thanks alot. Ur a lifesaver.
Hi, I found Ctrl-C and like is not working with CentOS 6.3 vbox image, and I guess the weird characters displayed were control characters. I have changed the keyboard layout, any idea what’s wrong?