⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loadkeys.html

📁 lfs3.1 从源代码构建linux。html版本。
💻 HTML
字号:
<HTML><HEAD><TITLE>Creating the loadkeys script</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Creating system boot scripts"HREF="../chapter07/chapter07.html"><LINKREL="PREVIOUS"TITLE="Creating the halt script"HREF="../chapter07/halt.html"><LINKREL="NEXT"TITLE="Creating the mountfs script"HREF="../chapter07/mountfs.html"></HEAD><BODYCLASS="sect1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Linux From Scratch: Version 3.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="../chapter07/halt.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 7. Creating system boot scripts</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter07/mountfs.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch07-loadkeys">7.9. Creating the loadkeys script</A></H1><P>You only need to create this script if you don't have a default 101 keys US keyboard layout.</P><P>Create the <TTCLASS="filename">/etc/init.d/loadkeys</TT> script by running the following command:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cat &#62; /etc/init.d/loadkeys &#60;&#60; "EOF"</B></TT>#!/bin/sh# Begin /etc/init.d/loadkeys## Include the functions declared in the /etc/init.d/functions file#source /etc/init.d/functions## Include /etc/sysconfig/keyboard which contains the LAYOUT variable#source /etc/sysconfig/keyboard## Load the default keymap file#echo -n "Loading keymap..."/bin/loadkeys $LAYOUT 2&#62;/dev/nullevaluate_retval# End /etc/init.d/loadkeys<TTCLASS="userinput"><B>EOF</B></TT></PRE></FONT></TD></TR></TABLE></P><DIVCLASS="sect2"><H2CLASS="sect2"><ANAME="AEN4273">7.9.1. Creating the /etc/sysconfig/keyboard file</A></H2><P>Create a new file <TTCLASS="filename">/etc/sysconfig/keyboard</TT> by running the following:</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cat &#62; /etc/sysconfig/keyboard &#60;&#60; "EOF"</B></TT># Begin /etc/sysconfig/keyboard LAYOUT=&#60;path-to-keymap&#62; # End /etc/sysconfig/keyboard<TTCLASS="userinput"><B>EOF</B></TT></PRE></FONT></TD></TR></TABLE></P><P>Replace <TTCLASS="userinput"><B>&#60;path-to-keymap&#62;</B></TT> with thepath to the keymap you have selected.  For example, if you have chosen the US keymap, you would replace it with <TTCLASS="userinput"><B>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz</B></TT></P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="../chapter07/halt.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter07/mountfs.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Creating the halt script</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter07/chapter07.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Creating the mountfs script</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -