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

📄 lsg11.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 5 页
字号:






<I>Computer Pin</I>







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<I>Meaning</I></FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







1







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







1







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Ground</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







2







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







3







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Transmit Data / Receive Data</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







3







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







2







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Receive Data / Transmit Data</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







4







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







4







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Ready to Send</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







5







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







5







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Clear to Send</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







6







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







20







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Data Set Ready / Data Terminal Ready</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







7







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







7







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Ground</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







8







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







20







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Carrier Detect / Data Terminal Ready</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







20







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







6,8







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Data Terminal Ready / Data Set Ready, Carrier Detect</FONT>







</TABLE><BLOCKQUOTE>







<BLOCKQUOTE>







<HR ALIGN=CENTER>







<BR>







<NOTE>If the wiring of a cable is not clearly indicated and your terminal doesn't work at all, you may need to purchase a null modem device. A null modem device is a connector that has the pin crossings within it, effectively converting a straight through cable to a null modem cable, and vice versa.</NOTE>







<BR>







<HR ALIGN=CENTER>







</BLOCKQUOTE></BLOCKQUOTE>







<BR>







<A NAME="E68E61"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Understanding the Login Process</B></FONT></CENTER></H3>







<BR>







<P>Administering a Linux system requires you to know many of the small processes involved in the kernel and device communications. One of the most important processes for users is observing a login prompt on their screens and logging in to the system successfully. Many users have no idea of the steps Linux goes through to provide a login prompt, so this section examines that process. An understanding of the login process is also necessary to know how to configure new terminals on your system, as several files must be modified to support the new devices.







<BR>







<BR>







<A NAME="E69E99"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>init and inittab</B></FONT></CENTER></H4>







<BR>







<P>The login process begins when the /etc/init daemon (sometimes stored in /sbin/init) is executed during the booting of the Linux system. The init process reads instructions from the file /etc/inittab and executes them in order. Usually, the init daemon is responsible for running a copy of the /etc/getty program for each terminal connected to the system. Without a getty process, the terminal and kernel can't communicate.







<BR>







<P>The init daemon knows whether a terminal is connected because of entries in the /etc/ttys and /etc/inittab files. The /etc/ttys file lists all ports on the system and the type of terminal that is connected to them. The /etc/inittab file holds a complete list of all terminals and their parameters. The section &quot;/etc/ttys and /etc/inittab &quot; examines these files in more detail.







<BR>







<P>When the /etc/ttys and /etc/inittab files indicate that a terminal is connected and active, the init daemon runs the /etc/getty program for that terminal. The getty program sets the communications parameters for the terminal and displays the login prompt on-screen. When a user logs in on a terminal, the getty process executes the login program to request a password. The login program validates the username and password against the entries in the /etc/passwd file.







<BR>







<P>If the login is validated properly, the login program displays the message of the day (stored in the file /etc/motd) and executes whatever the user is supposed to run as a startup program (usually a shell). As a final step, login sets the TERM environment variable, then exits.







<BR>







<BR>







<A NAME="E69E100"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>/etc/ttys and /etc/inittab</B></FONT></CENTER></H4>







<BR>







<P>Terminal configuration information is stored in the /etc/ttys and /etc/inittab files. The files are ASCII and can be modified by any editor, although you should be careful to keep the proper format and not disrupt existing entries. Before making any changes to the terminal configuration files, make a copy in case the changes you make are not effective and the file cannot be returned to its original state easily.







<BR>







<P>If you don't want to edit these files manually, some menu-driven programs are available that perform changes to the files for you based on a set of questions you answer. These administration utilities tend to be a little slower than editing the files manually, but they do ensure that the entries are in the proper format.







<BR>







<P>The /etc/ttys file is composed of two columns separated by any whitespace character. The first column shows the type of terminal assumed to be connected and is used to set the TERM environment variable. The second column holds the device name, less the /dev portion. A typical /etc/ttys file from a new installation of Linux looks like the following:







<BR>







<PRE>







<FONT COLOR="#000080">console tty1







console tty2







console tty3







console tty4







console tty5







console tty6







vt100 ttyp0







vt100 ttyp1







vt100 ttyp2







vt100 ttyp3</FONT></PRE>







<P>You use the /etc/inittab file to set the behavior of each terminal. The format of the /etc/inittab file follows this pattern:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">ID:runlevel:action:process</FONT></PRE>







<P>The ID is a one or two character string that uniquely identifies the entry. For terminals, this string corresponds to the device name, such as 1 for tty1. The runlevel decides the capabilities of the terminal with the various states the Linux operating system can be in. Run levels vary from 0 to 6. If no entry is provided, the terminal supports all run levels. You can mention multiple run levels in the field.







<BR>







<P>The action indicates the behavior of the terminal device when the system starts and when a getty process is terminated on it. Several valid entries for the action field apply to terminals:







<BR>







<UL>







<LI>once starts the process once







<BR>







<BR>







<LI>ondemand always keeps the process running (the same as respawn)







<BR>







<BR>







<LI>respawn always keeps the process running







<BR>



⌨️ 快捷键说明

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