Legibility of "free"-command impaired

Hello altogether and a Happy New Year,

could someone help me with the following problem?

Being in Germany my system (Lubuntu 18.04.3 LTS, 64 bit) was set up with German as the default language. Yet this proves to be difficult regarding the terminal-output of the “free”-command:

rosika@rosika-Lenovo-H520e ~> free
              Gesamt   belegt    frei        gemns. Puffer/Cache verfügbar
Speicher:     3956696     1244620      455208      180304     2256868     2259060
Auslagerungsspeicher:     1138216        6924     1131292

Even “free -h” is not optimized for legibility:

rosika@rosika-Lenovo-H520e ~> free -h
              Gesamt   belegt    frei        gemns. Puffer/Cache verfügbar
Speicher:        3,8G        1,2G        444M        176M        2,2G        2,2G
Auslagerungsspeicher:        1,1G        6,8M        1,1G

The representation of values are shifted in such a way that they become difficult to read.
For the sake of comparison here´s an example of an English output (taken from https://wiki.ubuntuusers.de/free/ ):

benutzer@host:~$ free -h
             total       used       free     shared    buffers     cached
Mem:          984M       513M       471M        37M        34M       310M
-/+ buffers/cache:       168M       816M
Swap:         123M         0B       123M

I´d be happy to use the English version but can´t make it work. I tried

env LANG=en_US.UTF-8 free -h

but still get the shifted output (plus in German).

Any ideas how to solve this issue?

Thanks a lot in advance.


the only thing i can see so far is that my .bashrc file has the following lines which seem like they might apply:

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

ubuntu mate and mint 18 also have those lines so i can’t imagine why they would be absent from your lubuntu, but i suppose it is possible.

Hi there.
I can confirm the phenomenon (haven’t realized this by now…).
I run a Mint 19.3 and the line that @01101111 mentioned is in my .bashrc…
I tried some settings in the terminal options like changing the font to user defined, but the result is always de-arranged…
Tried it in a virtual console too, same.
lsblk seems nice, it’s result is in english though…
Maybe I find some other way, keep looking.

1 Like

Thanks for looking it up.
I also checked my .bashrc file and - as with you and @Fast.Edi - the respective line is in my Lubuntu as well.
Perhaps the shifting s due to the German word “Auslagerungsspeicher”, which is quite long …
Anyway I´d be glad to use the Englih output if I conly could get it to work.

1 Like

Thanks also to you too for looking that one up.
lsblk is also nice with me (also in English).
It seems the distros behave the same way (regarding that phenomenon).

Das lässt mir keine Ruhe…

I found some solutions for this in askubuntu.com

I’m at work, so I can’t test it for now, but it looks legit.

Maybe you’ll start with answer #7

Nevertheless, the original problem keeps bugging me…


Thank you for finding a solution. I looked up the link you provided and it worked.
export LANGUAGE=en_GB:en
and then typing free -h gave me fine results:

              total        used        free      shared  buff/cache   available
Mem:           3.8G        2.1G        279M        163M        1.4G        1.3G
Swap:          1.1G         75M        1.0G

I see now that my original syntax
env LANG=en_US.UTF-8 free -h
didn´t seem to have been correct. I replaced it with

env LANG=en_GB:en free -h
which works the same way as exporting first.
So thanks again. Without your help I wouldn´t have been able to find the solution.

Rosika :smile:


seems like it would make for an easy alias if you want to save yourself a bit of typing each time.

Good suggestion. Thanks.

I have to admit I tend to neglect the use of aliases as I use fish as my default shell (https://fishshell.com/ ).
This gives me quite a few advantages.

So if I have to type the command
env LANG=en_GB:en free -h
just once it´s in my fish-history.

The next time I want to run the command again it´s sufficient to type “en” or “env” and the rest of the command is depicted slightly darker. Hitting the right-arrow-button plus “return” is then enough to get the whole thing going.
Tremendous comfort and worth trying out. :smile:


1 Like