Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Linux コンソールのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Linux コンソール
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:Linux console]] [[en:Linux console]] [[es:Linux console]] [[pt:Linux console]] [[zh-hans:Linux console]] {{Related articles start}} {{Related|コンソールでのキーボード設定}} {{Related|スクリーンショットの取得#仮想端末}} {{Related|コンソールのカラー出力}} {{Related|getty}} {{Related articles end}} [[Wikipedia:Linux console|Wikipedia]] より: :'''Linux コンソール'''は、[[カーネル|Linux カーネル]] に内蔵されているシステムコンソールです。Linux コンソールは、カーネルや他のプロセスがテキスト出力をユーザに送信したり、ユーザからのテキスト入力を受信したりするための方法を提供します。ユーザは通常、コンピュータのキーボードでテキストを入力し、出力されたテキストをコンピュータのモニタで読みます。Linux カーネルは仮想コンソールをサポートしています - コンソールは論理的に分離されていますが、同じ物理キーボードとディスプレイにアクセスします。 この記事では、Linux コンソールの基本とフォント表示の設定方法について説明します。キーボードの設定は、[[コンソールでのキーボード設定]] サブページで説明しています。 == 実装 == The console, unlike most services that interact directly with users, is implemented in the kernel. This contrasts with terminal emulation software, such as [[Xterm]], which is implemented in user space as a normal application. The console has always been part of released Linux kernels, but has undergone changes in its history, most notably the transition to using the [[Wikipedia:Linux framebuffer|framebuffer]] and support for [[Wikipedia:Unicode|Unicode]]. Despite many improvements in the console, its full backward compatibility with legacy hardware means it is limited compared to a graphical terminal emulator. === 仮想コンソール === The console is presented to the user as a series of [[Wikipedia:Virtual console|virtual consoles]]. These give the impression that several independent terminals are running concurrently; each virtual console can be logged in with different users, run its own shell and have its own font settings. The virtual consoles each use a device {{ic|/dev/ttyX}}, and you can switch between them by pressing {{ic|Alt+F''x''}} (where {{ic|''x''}} is equal to the virtual console number, beginning with 1). The device {{ic|/dev/console}} is automatically mapped to the active virtual console. See also {{man|1|chvt}}, {{man|1|openvt}} and {{man|1|deallocvt}}. === テキストモード === Since Linux originally began as a kernel for PC hardware, the console was developed using standard IBM [[Wikipedia:VGA|CGA/EGA/VGA]] graphics, which all PCs supported at the time. The graphics operated in VGA text mode, which provides a simple 80x25 character display with 16 colours. This legacy mode is similar to the capabilities of dedicated text terminals, such as the [[Wikipedia:VT100|DEC VT100]] series. It is still possible to boot in text mode if the system hardware supports it, but almost all modern distributions (including Arch Linux) use the framebuffer console instead. === フレームバッファーのコンソール === As Linux was ported to other non-PC architectures, a better solution was required, since other architectures do not use VGA-compatible graphics adapters, and may not support text modes at all. The framebuffer console was implemented to provide a standard console across all platforms, and so presents the same VGA-style interface regardless of the underlying graphics hardware. As such, the Linux console is not a terminal emulator, but a terminal in its own right. It uses the terminal type {{ic|linux}}, and is largely compatible with VT100. == キーボードショートカット == {| class="wikitable" ! Keyboard Shortcut ! Description |- | {{ic|Ctrl+Alt+Del}} | Reboots the system (specified by the symlink {{ic|/usr/lib/systemd/system/ctrl-alt-del.target}}) |- | {{ic|Alt+F1}}, {{ic|F2}}, {{ic|F3}}, ... | Switch to ''n''-th virtual console |- | {{ic|Alt+ ←}} | Switch to previous virtual console |- | {{ic|Alt+ →}} | Switch to next virtual console |- | {{ic|Scroll Lock}} | When Scroll Lock is activated, input/output is locked |- | {{ic|Ctrl+c}} | Kills current task |- | {{ic|Ctrl+d}} | Inserts an EOF |- | {{ic|Ctrl+z}} | Pauses current Task |} See also {{man|4|console_codes}}. == Fonts == {{Expansion|Mention kernel's builtin VGA 8x16 font ({{ic|CONFIG_FONT_8x16}}) and Terminus 16x32 font ({{ic|CONFIG_FONT_TER16x32}}), and how to use them. Link to [[HiDPI#Linux console]].}} {{Note|This section is about the [[Wikipedia:Linux console|Linux console]]. For alternative console solutions offering more features (full Unicode fonts, modern graphics adapters etc.), see [[KMSCON]] or similar projects.}} By default, the [[Wikipedia:Virtual console|virtual console]] uses the kernel built-in font with a [[Wikipedia:CP437|CP437]] character set,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> but this can be easily changed. The [[Wikipedia:Linux console|Linux console]] uses UTF-8 encoding by default, but because the standard VGA-compatible framebuffer is used, a console font is limited to either a standard 256, or 512 glyphs. If the font has more than 256 glyphs, the number of colours is reduced from 16 to 8. In order to assign correct symbol to be displayed to the given Unicode value, a special translation map, often called ''unimap'', is needed. Nowadays most of the console fonts have the ''unimap'' built-in; historically, it had to be loaded separately. The {{Pkg|kbd}} package provides tools to change virtual console font and font mapping. Available fonts are saved in the {{ic|/usr/share/kbd/consolefonts/}} directory, those ending with ''.psfu'' or ''.psfu.gz'' have a Unicode translation map built-in. Keymaps, the connection between the key pressed and the character used by the computer, are found in the subdirectories of {{ic|/usr/share/kbd/keymaps/}}, see [[/Keyboard configuration]] for details. {{Note|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}} {{Tip|For European based languages written in Latin/Greek letters you can use {{ic|eurlatgr}} font, it includes a broad range of Latin/Greek letter variations as well as special characters [https://lists.altlinux.org/pipermail/kbd/2014-February/000439.html].}} === Preview and temporary changes === {{Tip|An organized library of images for previewing is available: [https://alexandre.deverteuil.net/pages/consolefonts/ Linux console fonts screenshots].}} $ showconsolefont shows a table of glyphs or letters of a font. {{ic|setfont}} temporarily change the font if passed a font name (in {{ic|/usr/share/kbd/consolefonts/}}) such as $ setfont lat2-16 -m 8859-2 Font names are case-sensitive. With no parameter, {{ic|setfont}} returns the console to the default font. So to have a '''small 8x8''' font, with that font installed like seen below, use e.g.: $ setfont -h8 /usr/share/kbd/consolefonts/drdos8x8.psfu.gz To have a '''bigger''' font, the Terminus font ({{Pkg|terminus-font}}) is available in many sizes, such as {{ic|ter-132n}} which is large. {{Tip|All font changing commands can be typed in "blind".}} {{Note|''setfont'' only works on the console currently being used. Any other consoles, active or inactive, remain unaffected.}} === Persistent configuration === The {{ic|FONT}} variable in {{ic|/etc/vconsole.conf}} is used to set the font at boot, persistently for all consoles. See {{man|5|vconsole.conf}} for details. For displaying characters such as ''Č, ž, đ, š'' or ''Ł, ę, ą, ś'' using the font {{ic|lat2-16.psfu.gz}}: {{hc|/etc/vconsole.conf|2= ... FONT=lat2-16 FONT_MAP=8859-2 }} It means that second part of ISO/IEC 8859 characters are used with size 16. You can change font size using other values (e.g. {{ic|lat2-08}}). For the regions determined by 8859 specification, look at the [[Wikipedia:ISO/IEC 8859#The parts of ISO/IEC 8859]]. To use the specified font in early userspace, use the {{ic|consolefont}} hook in {{ic|/etc/mkinitcpio.conf}}. See [[Mkinitcpio#HOOKS]] for more information. If the fonts appear to not change on boot, or change only temporarily, it is most likely that they got reset when graphics driver was initialized and console was switched to framebuffer. To avoid this, load your graphics driver earlier. See for example [[Kernel mode setting#Early KMS start]], [https://bbs.archlinux.org/viewtopic.php?id=145765] or other ways to setup your framebuffer before {{ic|/etc/vconsole.conf}} is applied. == HiDPI == [[HiDPI#Linux コンソール]] を参照。 == Audible tones == [[PC スピーカー#Beep]] を参照。 == See also == * [https://www.linusakesson.net/programming/tty/ The TTY demystified – Linus Åkesson]
このページで使用されているテンプレート:
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
Linux コンソール
に戻る。
検索
検索
Linux コンソールのソースを表示
話題を追加