after starting agetty on my Raspberry Pi in order to attach a VT420 terminal to it, I still have an issue: The shell language must be set to en_US and exported by hand right after logging in on the terminal (my version of Raspbian has German locale). Motivation: The terminal does not support UTF-8 characters (and sometimes even stops working when receiving such a character), so I decided to fall back to English locale especially when logging in on the terminal. In all other cases (SSH etc.), UTF-8 is absolutely fine.

I followed the suggestion set forth in question #455261 and added the following line to the systemd service file responsible for agetty:


After a daemon reload and a restart of agetty, the login prompt is now in English, but when I start a program (say, df -h), its output is still in German and contains UTF-8 characters, causing the already-mentioned problems:

pi@autoradio:/import/valen/autoradio $ df -h
Dateisystem           Grö

…whereas the ö sequence should read as "ö".

On the shell, I would say, export LANG=en_US, but I am not sure about how to export an env variable set in a systemd config.

Does anybody know that? Thank you.

  • perhaps something in your login is overriding LANG?
    – Jeff Schaller
    Feb 10, 2019 at 0:05
  • Querying $LANG in the shell did return en_US!
    – Neppomuk
    Feb 10, 2019 at 14:02
  • So it would seem that systemd is successfully setting it? Are we now talking about df's behavior? Could you show an example of the behavior?
    – Jeff Schaller
    Feb 10, 2019 at 14:07
  • Well, I have no screenshot from the terminal screen, but see the updated question for how it looked like. Other programs used German locale, too.
    – Neppomuk
    Feb 10, 2019 at 14:11
  • (edit the content into the question; comments are next to useless for output)
    – Jeff Schaller
    Feb 10, 2019 at 14:11


You must log in to answer this question.

Browse other questions tagged .