Chapter 9: Adjusting Localization Options

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The Linux locale environment variables

$ locale LANG=en_US.UTF-8 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= $

$ locale --help

-a, --all-locales Write names of available locales -m, --charmaps Write names of available charmaps Modify output format: -c, --category-name Write names of selected categories -k, --keyword-name Write names of selected keywords -v, --verbose Print more information -?, --help Give this help list --usage Give a short usage message -V, --version Print program version

Unicode

An international standard that uses a 3-byte code and can represent every character known to be in use in all countries of the world

export LANG=en_GB.UTF-8 $ locale LANG=en_GB.UTF-8 LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL= $

Changes locales to GB

date

Displays or sets the date as kept by the Linux system

hwclock

Displays or sets the time as kept on the internal BIOS clock on the workstation or server

#mv /etc/localetime /etc/localtime.bak #ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime $date Fri 5 Oct 18:20:05 PDT 2018 $

How to edit time zones

$ date Fri Oct 5 21:15:33 EDT 2018 $

Show the time zone

$ localectl System Locale: LANG=en_US.UTF-8 VC Keymap: us X11 Layout: us $

Shows the LANG enviroment, keyboard mapping and the X11 graphical environment layout

ASCII

The American Standard Code for Information Interchange (ASCII) uses 7 bits to store characters found in the English language.

$ locale -cK MONETARY LC_MONETARY int_curr_symbol="USD" currency_symbol=$" mon_decimal_point="." mon_thousands_sep="," mon_groupings=3;3 positive_sign="" negative_sign="-" monetary-decimal-point-wc=46 monetary-thousands-sep-wc=44 monetary-codeset="UTF-8" $

The detailed settings for the LC_MONETARY localization

localectl

This command is used to view and configure the system locale (language, monetary values etc.) and keyboard layout settings. subcommands inlcude status, list-locales, set-locale, list-keymaps, and set-keymap

Localization

the ability to adapt a Linux system to a specific locale


Ensembles d'études connexes

Chapter 11 Managing Project Teams

View Set

AWS Cloud Practitioner - Cloud Concepts

View Set

3 - Life Insurance Policies - Provisions, Options and Riders part 1

View Set

HIST1302 - InQuizitive - Ch 27: The Cold War and the Fair Deal, 1945-1952

View Set

Chapter 5: Elasticity: A measure of Responsiveness

View Set

Pharmacology II Prep U Chapter 47: Lipid-Lowering Agents

View Set

Mobility - Spinal Cord Injuries - Unit 4, Sem 4

View Set