A
A
Alexey Kuznetsov2015-09-11 16:57:38
linux
Alexey Kuznetsov, 2015-09-11 16:57:38

Where do you change the regional settings of the Linux console?

Tell me how you can change, preferably for one user of the system, regional settings, in particular the format of the displayed date.
For example, we have the output of the date command

#date
Fri Sep 11 16:46:33 MSK 2015

We can run this command with parameters, for example:
#date +F
2015-09-11

But not all commands have similar switches, for example, the output of the ls command cannot be modified in this way, for example:
#ls -l
drwx------ 2 root root 4096 Sep 11 15:27 mc-root

but I would like
drwx------ 2 root root 4096 2015-09-11 15:27 mc-root

How can I configure the console so that #date would default to 2015-09-11

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
DevMan, 2015-09-11
@Poison48

head- on solution: alias date="date +F"
an example with editing the locale.

L
Lynn "Coffee Man", 2015-09-11
@Lynn

ls -l --time-style=+%F
I'm not sure if this can be made the default format, then you can make an alias for ls

R
Ruslan Fedoseev, 2015-09-11
@martin74ua

Regional settings is the locale. Here you can see how to set up the locale, how to assign it to yourself at the entrance ...

A
Andre la'Balm, 2015-09-11
@grumblik

# locale
# locale -a will show all available locales
and, in fact, change the necessary variables in your user's bashrc (well, or which shell you have)
If you have any questions, write in the comments, I will answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question