Documentation for a newer release is available. View Latest

시스템 지역과 키보드 구성

indexterm:[keyboard configuration] The *system locale* specifies the language settings of system services and user interfaces. The *keyboard layout* settings control the layout used on the text console and graphical user interfaces.

These settings can be made by modifying the /etc/locale.conf configuration file or by using the localectl utility. You can also set these settings during system installation using the installer graphical interface, text mode interface, or the keyboard and lang Kickstart commands. See the link:https://docs.fedoraproject.org/en-US/fedora/fFedora 35/install-guide[Fedora Installation Guide] for information about these options.

시스템 지역 설정하기

System-wide locale settings are stored in the /etc/locale.conf file, which is read at early boot by the systemd daemon. The locale settings configured in /etc/locale.conf are inherited by every service or user, unless individual programs or individual users override them.

The basic file format of /etc/locale.conf is a newline-separated list of variable assignments. For example, German locale with English messages in /etc/locale.conf looks as follows:

LANG=de_DE.UTF-8
LC_MESSAGES=C

Here, the LC_MESSAGES option determines the locale used for diagnostic messages written to the standard error output. To further specify locale settings in /etc/locale.conf, you can use several other options, the most relevant are summarized in Options configurable in /etc/locale.conf. See the locale(7) manual page for detailed information on these options. Note that the LC_ALL option, which represents all possible options, should not be configured in /etc/locale.conf.

Table 1. /etc/locale.conf에서 구성 할 수 있는 옵션
옵션 설명

LANG

Provides a default value for the system locale.

LC_COLLATE

Changes the behavior of functions which compare strings in the local alphabet.

LC_CTYPE

Changes the behavior of the character handling and classification functions and the multibyte character functions.

LC_NUMERIC

Describes the way numbers are usually printed, with details such as decimal point versus decimal comma.

LC_TIME

Changes the display of the current time, 24-hour versus 12-hour clock.

LC_MESSAGES

Determines the locale used for diagnostic messages written to the standard error output.

현재 상태 표시하기

The localectl command can be used to query and change the system locale and keyboard layout settings. To show the current settings, use the status option:

localectl 상태
Example 1. 현재 상태 표시하기

The output of the previous command lists the currently set locale, keyboard layout configured for the console and for the X11 window system.

~]$ localectl status
   System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: n/a

사용 가능한 지역 나열하기

자신의 시스템을 위해 사용 가능한 모든 지역을 나열하려면, 다음과 같이 입력하세요:

localectl list-locales
Example 2. 지역 나열하기

Imagine you want to select a specific English locale, but you are not sure if it is available on the system. You can check that by listing all English locales with the following command:

~]$ localectl list-locales | grep ko_KR_
ko_KR.UTF-8

잘린 출력

지역 설정하기

기본 시스템 지역을 설정하려면, `root`으로 다음과 같은 명령을 사용합니다:

localectl set-locale LANG=locale

Replace locale with the locale name, found with the localectl list-locales command. The above syntax can also be used to configure parameters from Options configurable in /etc/locale.conf.

Example 3. 기본 지역 변경하기

For example, if you want to set British English as your default locale, first find the name of this locale by using list-locales. Then, as root, type the command in the following form:

~]# localectl set-locale LANG=en_GB.utf8

키보드 배열 변경하기

The keyboard layout settings enable the user to control the layout used on the text console and graphical user interfaces.

현재 설정 표시하기

As mentioned before, you can check your current keyboard layout configuration with the following command:

localectl 상태
Example 4. 키보드 설정 표시하기

In the following output, you can see the keyboard layout configured for the virtual console and for the X11 window system.

~]$ localectl status
   System Locale: LANG=ko_KR.UTF-8
       VC Keymap: kr
      X11 Layout: kr

사용 가능한 키맵 나열하기

자신의 시스템에서 구성 할 수 있는 모든 사용 가능한 키보드 배열을 나열하려면, 다음과 같이 입력하세요:

localectl list-keymaps
Example 5. 특별한 키맵을 위한 검색하기

You can use grep to search the output of the previous command for a specific keymap name. There are often multiple keymaps compatible with your currently set locale. For example, to find available Czech keyboard layouts, type:

~]$ localectl list-keymaps | grep cz
cz
cz-cp1250
cz-lat2
cz-lat2-prog
cz-qwerty
cz-us-qwertz
sunt5-cz-us
sunt5-us-cz

키맵 설정

자신의 시스템을 위한 기본 키보드 배열을 설정하려면, `root`으로 다음 명령을 사용하세요:

localectl set-keymap map

Replace map with the name of the keymap taken from the output of the localectl list-keymaps command. Unless the --no-convert option is passed, the selected setting is also applied to the default keyboard mapping of the X11 window system, after converting it to the closest matching X11 keyboard mapping. This also applies in reverse, you can specify both keymaps with the following command as root:

localectl set-x11-keymap map

만약 당신이 자신의 X11 배열을 콘솔 배열과 다르게 하고자 하면, [option]`--no-convert`옵션을 사용하세요.

localectl --no-convert set-x11-keymap map

With this option, the X11 keymap is specified without changing the previous console layout setting.

Example 6. X11 키맵을 별도로 설정하기

Imagine you want to use German keyboard layout in the graphical interface, but for console operations you want to retain the US keymap. To do so, type as root:

~]# localectl --no-convert set-x11-keymap de

Then you can verify if your setting was successful by checking the current status:

~]$ localectl status
   System Locale: LANG=de_DE.UTF-8
       VC Keymap: us
      X11 Layout: de

Apart from keyboard layout (map), three other options can be specified:

localectl set-x11-keymap map model variant options

Replace model with the keyboard model name, variant and options with keyboard variant and option components, which can be used to enhance the keyboard behavior. These options are not set by default. For more information on X11 Model, X11 Variant, and X11 Options see the kbd(4) man page.

만약 그놈을 사용하면 이와 같은 옵션을 고려하세요

이는 만약 다음 상태를 적용하고 하면 동작해야 합니다:

  • 데스크탑 환경으로 그놈을 사용하기

  • 자신의 배열은 Settings → Keyboard → Input Sources하에서 나열되지 않습니다

자신의 터미널에서 다음을 입력하세요:

gsettings set org.gnome.desktop.input-sources show-all-sources true

after pressing return, try looking under your keyboard settings again as there should be a lot more options available. As the proper source for help is gnome in this case, here is more information from gnome:

추가 자원

페도라에서 키보드 배열을 구성하는 방법에 대해 더 많은 정보를 위해, 아래 나열된 자원을 참고하세요:

설치된 문서
  • localectl(1) — The manual page for the localectl command line utility documents how to use this tool to configure the system locale and keyboard layout.

  • loadkeys(1) — The manual page for the loadkeys command provides more information on how to use this tool to change the keyboard layout in a virtual console.