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

📄 agetty.8

📁 Util-linux 软件包包含许多工具。其中比较重要的是加载、卸载、格式化、分区和管理硬盘驱动器
💻 8
字号:
.TH AGETTY 8 .SH NAMEagetty \- alternative Linux getty.SH SYNOPSIS.BR "agetty " [\-ihLmnw].RI "[-f " issue_file ].RI "[-l " login_program ].RI "[-I " init ].RI "[-t " timeout ].RI "[-H " login_host ].I port.I baud_rate,....RI [ term ].br.BR "agetty " [\-ihLmnw].RI "[-f " issue_file ].RI "[-l " login_program ].RI "[-I " init ].RI "[-t " timeout ].RI "[-H " login_host ].I baud_rate,....I port.RI [ term ].SH DESCRIPTION.ad.fi\fBagetty\fP opens a tty port, prompts for a login name and invokesthe /bin/login command. It is normally invoked by \fIinit(8)\fP.\fBagetty\fP has several \fInon-standard\fP features that are usefulfor hard-wired and for dial-in lines:.IP oAdapts the tty settings to parity bits and to erase, kill,end-of-line and uppercase characters when it reads a login name.The program can handle 7-bit characters with even, odd, none or spaceparity, and 8-bit characters with no parity. The following specialcharacters are recognized: @ and Control-U (kill); #, DEL andback space (erase); carriage return and line feed (end of line)..IP oOptionally deduces the baud rate from the CONNECT messages produced byHayes(tm)-compatible modems..IP oOptionally does not hang up when it is given an already opened line(useful for call-back applications)..IP oOptionally does not display the contents of the \fI/etc/issue\fP file..IP oOptionally displays an alternative issue file instead of \fI/etc/issue\fP..IP oOptionally does not ask for a login name..IP oOptionally invokes a non-standard login program instead of\fI/bin/login\fP..IP oOptionally turns on hard-ware flow control.IP oOptionally forces the line to be local with no need for carrier detect..PPThis program does not use the \fI/etc/gettydefs\fP (System V) or\fI/etc/gettytab\fP (SunOS 4) files..SH ARGUMENTS.na.nf.fi.ad.TPportA path name relative to the \fI/dev\fP directory. If a "-" isspecified, \fBagetty\fP assumes that its standard input isalready connected to a tty port and that a connection to aremote user has already been established..spUnder System V, a "-" \fIport\fP argument should be precededby a "--"..TPbaud_rate,...A comma-separated list of one or more baud rates. Each time\fBagetty\fP receives a BREAK character it advances throughthe list, which is treated as if it were circular..spBaud rates should be specified in descending order, so that thenull character (Ctrl-@) can also be used for baud rate switching..TPtermThe value to be used for the TERM environment variable. This overrideswhatever init(8) may have set, and is inherited by login and the shell..SH OPTIONS.na.nf.fi.ad.TP\-hEnable hardware (RTS/CTS) flow control. It is left up to theapplication to disable software (XON/XOFF) flow protocol whereappropriate..TP\-iDo not display the contents of \fI/etc/issue\fP (or other) before writing thelogin prompt. Terminals or communications hardware may become confusedwhen receiving lots of text at the wrong baud rate; dial-up scriptsmay fail if the login prompt is preceded by too much text..TP\-f \fIissue_file\fPDisplay the contents of \fIissue_file\fP instead of \fI/etc/issue\fP.This allows custom messages to be displayed on different terminals.The \-i option will override this option..TP\-I \fIinitstring\fPSet an initial string to be sent to the tty or modem before sendinganything else. This may be used to initialize a modem.  Non printablecharacters may be sent by writing their octal code preceded by abackslash (\\). For example to send a linefeed character (ASCII 10,octal 012) write \\012..PP.TP\-l \fIlogin_program\fPInvoke the specified \fIlogin_program\fP instead of /bin/login.This allows the use of a non-standard login program (for example,one that asks for a dial-up password or that uses a differentpassword file)..TP\-H \fIlogin_host\fPWrite the specified \fIlogin_host\fP into the utmp file. (Normally,no login host is given, since \fBagetty\fP is used for local hardwiredconnections and consoles. However, this option can be useful for identifying terminal concentrators and the like..TP\-mTry to extract the baud rate the CONNECT status messageproduced by Hayes(tm)\-compatible modems. These statusmessages are of the form: "<junk><speed><junk>".\fBagetty\fP assumes that the modem emits its status message atthe same speed as specified with (the first) \fIbaud_rate\fP valueon the command line..spSince the \fI\-m\fP feature may fail on heavily-loaded systems,you still should enable BREAK processing by enumerating allexpected baud rates on the command line..TP \-n Do not prompt the user for a login name. This can be used inconnection with \-l option to invoke a non-standard login process suchas a BBS system. Note that with the \-n option, \fBagetty\fR gets no input fromuser who logs in and therefore won't be able to figure out parity,character size, and newline processing of the connection. It defaults to space parity, 7 bit characters, and ASCII CR (13) end-of-line character.Beware that the program that \fBagetty\fR starts (usually /bin/login)is run as root..TP\-t \fItimeout\fPTerminate if no user name could be read within \fItimeout\fPseconds. This option should probably not be used with hard-wiredlines..TP\-LForce the line to be a local line with no need for carrier detect. This canbe useful when you have a locally attached terminal where the serial linedoes not set the carrier detect signal..TP\-w Wait for the user or the modem to send a carriage-return or alinefeed character before sending the \fI/etc/issue\fP (or other) fileand the login prompt. Very useful in connection with the \-I option..PP.SH EXAMPLESThis section shows examples for the process field of an entry in the\fI/etc/inittab\fP file.  You'll have to prepend appropriate valuesfor the other fields.  See \fIinittab(5)\fP for more details.For a hard-wired line or a console tty:.ti +5/sbin/agetty 9600 ttyS1For a directly connected terminal without proper carriage detect wiring:(try this if your terminal just sleeps instead of giving you a password:prompt.).ti +5/sbin/agetty \-L 9600 ttyS1 vt100For a old style dial-in line with a 9600/2400/1200 baud modem:.ti +5/sbin/agetty \-mt60 ttyS1 9600,2400,1200For a Hayes modem with a fixed 115200 bps interface to the machine:(the example init string turns off modem echo and result codes, makesmodem/computer DCD track modem/modem DCD, makes a DTR drop cause a dis-connection and turn on auto-answer after 1 ring.).ti +5/sbin/agetty \-w \-I 'ATE0Q1&D2&C1S0=1\\015' 115200 ttyS1.SH ISSUE ESCAPESThe issue-file (\fI/etc/issue\fP or the file set with the \-f option)may contain certain escape codes to display the system name, date andtime etc. All escape codes consist of a backslash (\\) immediatelyfollowed by one of the letters explained below..TPbInsert the baudrate of the current line..TPdInsert the current date..TPsInsert the system name, the name of the operating system..TPlInsert the name of the current tty line..TPmInsert the architecture identifier of the machine, eg. i486.TPnInsert the nodename of the machine, also known as the hostname..TPoInsert the domainname of the machine..TPrInsert the release number of the OS, eg. 1.1.9..TPtInsert the current time..TPuInsert the number of current users logged in..TPUInsert the string "1 user" or "<n> users" where <n> is the number of currentusers logged in..TPvInsert the version of the OS, eg. the build-date etc..TPExample: On my system, the following \fI/etc/issue\fP file:.na.nf.ti +.5This is \\n.\\o (\\s \\m \\r) \\t.TPdisplays as.ti +.5This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30.fi.SH FILES.na.nf/var/run/utmp, the system status file./etc/issue, printed before the login prompt./dev/console, problem reports (if syslog(3) is not used)./etc/inittab, \fIinit\fP(8) configuration file..SH BUGS.ad.fiThe baud-rate detection feature (the \fI-m\fP option) requires that\fBagetty\fP be scheduled soon enough after completion of a dial-incall (within 30 ms with modems that talk at 2400 baud). For robustness,always use the \fI\-m\fP option in combination with a multiple baudrate command-line argument, so that BREAK processing is enabled.The text in the \fI/etc/issue\fP file (or other) and the login promptare always output with 7-bit characters and space parity.The baud-rate detection feature (the \fI-m\fP option) requires thatthe modem emits its status message \fIafter\fP raising the DCD line..SH DIAGNOSTICS.ad.fiDepending on how the program was configured, all diagnostics arewritten to the console device or reported via the syslog(3) facility.Error messages are produced if the \fIport\fP argument does notspecify a terminal device; if there is no utmp entry for thecurrent process (System V only); and so on..SH AUTHOR(S).na.nfW.Z. Venema <wietse@wzv.win.tue.nl>Eindhoven University of TechnologyDepartment of Mathematics and Computer ScienceDen Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The NetherlandsPeter Orbaek <poe@daimi.aau.dk>Linux port and more options. Still maintains the code.Eric Rasmussen <ear@usfirst.org>Added \-f option to display custom login messages on different terminals..SH CREATION DATE.na.nfSat Nov 25 22:51:05 MET 1989.SH LAST MODIFICATION.na.nf96/07/20

⌨️ 快捷键说明

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