在区域设置更改后无法登录Raspberry Pi Linux

时间:2022-11-17 18:08:52

I changed the keyboard mapping on my Raspberry Pi and am no longer able to login (because the keys I press are interpreted very differently; a "p" is an "r" etc.). Has anyone run into this and is there an easier way to fix this than to re-image the OS on my SD card?

我更改了Raspberry Pi上的键盘映射,并且无法再登录(因为我按下的键被解释得非常不同;“p”是“r”等)。有没有人碰到这个并且有一个更简单的方法来解决这个问题,而不是重新映像我的SD卡上的操作系统?

Contents of my SD card 在区域设置更改后无法登录Raspberry Pi Linux

我的SD卡的内容

1 个解决方案

#1


1  

Answering my own question for the benefit of others. As yakiang suggested, ssh into your raspberry pi (this assumes you enabled the ssh deamon to run your pi upon each boot up before this problem occurred). Edit /etc/default/locale and /etc/default/keyboard to the correct settings as follows.

为了别人的利益回答我自己的问题。正如yakiang建议的那样,ssh进入你的覆盆子pi(这假设你启用了ssh deamon在每次启动之前运行你的pi,然后才会出现这个问题)。将/ etc / default / locale和/ etc / default / keyboard编辑为正确的设置,如下所示。

/etc/default/locale LANG=en_US.UTF-8

/ etc / default / locale LANG = en_US.UTF-8

/etc/default/keyboard XKBMODEL="pc105" XKBLAYOUT="us"

/ etc / default / keyboard XKBMODEL =“pc105”XKBLAYOUT =“我们”

#1


1  

Answering my own question for the benefit of others. As yakiang suggested, ssh into your raspberry pi (this assumes you enabled the ssh deamon to run your pi upon each boot up before this problem occurred). Edit /etc/default/locale and /etc/default/keyboard to the correct settings as follows.

为了别人的利益回答我自己的问题。正如yakiang建议的那样,ssh进入你的覆盆子pi(这假设你启用了ssh deamon在每次启动之前运行你的pi,然后才会出现这个问题)。将/ etc / default / locale和/ etc / default / keyboard编辑为正确的设置,如下所示。

/etc/default/locale LANG=en_US.UTF-8

/ etc / default / locale LANG = en_US.UTF-8

/etc/default/keyboard XKBMODEL="pc105" XKBLAYOUT="us"

/ etc / default / keyboard XKBMODEL =“pc105”XKBLAYOUT =“我们”