So I have 2 different Linux installations. One of them is Ubuntu and the second one is Kali.
When I run date command with no options/arguments on my Ubuntu install I get:
michal@ubuntu:~$ date
Thu 24 Mar 2022 07:56:23 PM CET
When I run date command with no options/arguments on my Kali install I get:
┌──(michal㉿kali)-[~]
└─$ date
Thu Mar 24 07:58:34 PM CET 2022
The locale setting is the same on both machines being:
Ubuntu locale settings:
michal@ubuntu:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
and Kali locale settings:
┌──(michal㉿kali)-[~]
└─$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Why the date command output is different on both machines?
I want to PERMANENTLY change the Kali output, to be the same as my current Ubuntu output being:
michal@ubuntu:~$ date
Thu 24 Mar 2022 07:56:23 PM CET
Which file needs to be edited? Where are those settings?
I've tried to follow steps from this thread:
How can I change the default date format (using LC_TIME)?
but I don't understand what:
"date's texinfo also explicitly recommends to set LC_TIME to C in order to produce locale independent output." means.
locale -c d_t_fmtunless I add the+%cspecifier explicitly)LC_TIMEvariable, likeLC_TIME=C date(which only changes it temporarily for that command).