Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just changed default motd in Ubuntu (I edited /etc/update-motd.d/* files) and added some string in polish:

echo "Aby uzyskać dodatkowe informacje i przykładowe skrypty wpisz:"

but autogenerated /etc/motd is without accent characters:

Aby uzyska dodatkowe informacje i przykadowe skrypty wpisz:

So "ć" and "ł" is missing. So how to enable utf-8 encoding in motd?

share|improve this question
up vote 1 down vote accepted

You can use the LANG environment variable to enable UTF-8 encoding. Just edit your script file (under /etc/update-motd.d/*) by adding the line:

export LANG="en_US.UTF-8"
share|improve this answer
I've already tried this and it is not working. – klew Nov 30 '10 at 12:10
I've just tried it again and now it is working. When I edited my files with motd there was no accecnt characters at all (it is strange, because I was writing motd with them several times). I added them and now it works. Thanks for your answer! – klew Dec 2 '10 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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