Sample Header Ad - 728x90

PERMANENTLY change the output format of the 'date' command in my Kali Linux

5 votes
2 answers
5001 views
So I have 2 different Linux installations. One of them is Ubuntu and the second one is Kali. When I run
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
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
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
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
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: "
's texinfo also explicitly recommends to **set LC_TIME to C** in order to produce locale independent output." means.
Asked by michal roesler (289 rep)
Mar 24, 2022, 07:41 PM
Last activity: Nov 23, 2024, 01:35 PM