2

Running localectl status I see that my locale is LANG=en_GB.UTF-8 bla bla bla

I'm trying to pipe ls output to more (ls --help | more) but the when I use the pipe key I get some another character. (Pipe is shift back slash, above the enter key on my US keyboard)

Pipe char on a en-GB keyboard seems to be between the Z and the left shift. The left shift key is 1/2 sized.

1
  • 2
    I actually think this is a keyboard layout issue and not a locale issue, locale only changes things like formatting for date and time and error message languages. Keyboard layout will determine what happens when you press various keys on the keyboard. Commented Jan 1, 2018 at 22:17

1 Answer 1

4

I found this post which got me going: https://rohankapoor.com/2012/04/americanizing-the-raspberry-pi/

I'm assuming this was written from an older version of Raspbian because there's a few differences from what I saw. Regardless, it works and has nice screen shots.

Here's the text cliff notes:

sudo dpkg-reconfigure locales

cursor to your selection (en_US.UTF-8 UTF-8 for me) and press space bar to select. Tab to highlight then Enter

Next select default locale (en_US.UTF-8 for me again)

sudo dpkg-reconfigure keyboard-reconfiguration

(default "Generic 106-key (Intl) PC for me) Tab to and enter

Next screen is keyboard layout (Selected English (US) )

Next screen is AltGr selection. (I picked No AltGr key )

Next screen is Compose key. (I picked No compose key)

And I'm back at a command prompt

sudo dpkg-reconfigure tzdata

First screen geographic area (I picked America)

Next is city or region (I picked New York)

Finally a reboot with

sudo reboot

Boom, I can type a pipe character !!! |||

Note, you can also access these screens from:

sudo raspi-config

Then pick 4 Localisation options There's a lot of other interesting bits also.

Some have pointed out that this is more than what is needed to get the keyboard locale reconfigured. That is correct but most likely anyone having this issue will need to set these other items as well for a complete solution. If they've already done the other steps then it'll be easy to skip them.

2
  • It would be much EASIER and less error prone if you just used the Internationalisation options in raspi-config
    – Milliways
    Commented Jan 1, 2018 at 22:58
  • 2
    Your timezone and locale have nothing at all to do with your keyboard layout, only keyboard-reconfiguration matters here.
    – Chris Down
    Commented Jan 1, 2018 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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