Вы находитесь на странице: 1из 19

developerWorks 20.09.

2006

102 LPI, 108:


Linux
Junior Level Administration (LPIC-1), 108


( )
, , man.

, .
, Linux ,
, .
, ,
. 1 man.
man man .
1. man

1
:
1. ,

.
2. ,
.
3. (synopsis) , .
4. .
5. .
, , , ,
. ,
man , ( )
:
apropos(1), whatis(1), less(1), groff(1) man.conf(5).


(pager), less Linux-.
, $PAGER,
man -P --pager
.
stdin,
.
.
, , ,
, , . ,
.
, , :
1.
2.
3.
4.
5.
6.

(env, ls, echo, mkdir, tty).


(link, sethostname, mkdir).
(acosh, asctime, btree, locale, XML::Parser).
(isdn_audio, mouse, tty, zero).
(keymaps, motd, wvdial.conf).
( ,
,
).
7. (arp, boot, regex, unix utf8).
8. (debugfs, fdisk, fsck, mount, renice, rpm).
, ,
: 9 ( Linux-), n ( ), o (
) l ( ).
. mkdir
1 2, tty 1 4.
info
Free Software
Foundation info-,
info. ,
.

man info info info.


info, man, info.
info, info
, 1.
1. info
File: dir,
Node: Top

This is the top of the INFO tree

This (the Directory node) gives a menu of major topics.


Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
In Emacs, you can click mouse button 2 on a menu item or cross
reference
to select it.
* Menu:
Utilities
* Bash: (bash).
* Enscript: (enscript).
* Gzip: (gzip).
* ZSH: (zsh).

The GNU Bourne-Again SHell.


GNU Enscript
The gzip command for compressing files.
The Z Shell Manual.

Libraries
* AA-lib: (aalib).
* History: (history).
* Libxmi: (libxmi).
* Readline: (readline).

An ASCII-art graphics library


The GNU history library API
The GNU libxmi 2-D rasterization library.
The GNU readline library API

Texinfo documentation system


* Info: (info).
Documentation browsing system.
-----Info: (dir)Top, 2104 lines -Top------------------------------------------Welcome to Info version 4.6. Type ? for help, m for menu item.


man,
,
, xman (
XFree86 Project) yelp ( Gnome).
xman .
Manual Page, ,
. 2
.

2. xman

yelp - . 3
Ubuntu 6.06.
, info-, Command Line
Help .
3. yelp Ubuntu

, ,
. , man 4 tty man 2 mkdir.
-a
. -a,
. ,
.
, .
, -aw
man .
2 printf.
, , , man 1p printf
POSIX- printf. ,
C C++, man 3 printf,
printf, fprintf, sprintf,
snprintf, vprintf, vfprintf, vsprintf vsnprintf.
2. printf
ian@lyrebird:~> man -aw printf
/usr/share/man/man1/printf.1.gz
/usr/share/man/man1p/printf.1p.gz
/usr/share/man/man3/printf.3.gz

man
. Linux , , less.
more.
less ,
. vi.
man less
/ ( ), ? ( ) n ( ),
.
info emacs,
emacs-. , ctrl-s , ctrl-r
, .
,
( ) Enter,
q. --vi-keys info,
, man.

, man, whatis apropos.
whatis
.
apropos
, . 3
.

3. whatis apropos
[ian@lyrebird ian]$ whatis man
man
(1) - format and display the on-line manual pages
man
(7) - macros to format man pages
man [manpath]
(1) - format and display the on-line manual pages
man.conf [man]
(5) - configuration data for man
[ian@lyrebird ian]$ whatis mkdir
mkdir
(1) - make directories
mkdir
(2) - create a directory
[ian@lyrebird ian]$ apropos mkdir
mkdir
(1) - make directories
mkdir
(2) - create a directory
mkdirhier
(1x) - makes a directory hierarchy

, man.conf,
man man.config ,
.
apropos ,
, ,
.
, grep
.
e2label
ext2 ext3, ReiserFS
, . ,
mount ,
4.
4. ReiserFS
ian@lyrebird:~> mount -t reiserfs
LABEL=SLES9 on / type reiserfs (rw,acl,user_xattr)

, SLES9,
. apropos label
, . .
- .
, 5.
5. apropos
ian@lyrebird:~> apropos "label.*file"
e2label (8)
- Change the label on an ext2/ext3 filesystem
ntfslabel (8)
- display/change the label on an ntfs file system
ian@lyrebird:~> apropos "label.*volume"
label.*volume: nothing appropriate.

, .
,
grep egrep, 6.
6. apropos
ian@lyrebird:~> apropos label | grep -E "file|volume"
e2label (8)
- Change the label on an ext2/ext3 filesystem
mlabel (1)
- make an MSDOS volume label
ntfslabel (8)
- display/change the label on an ntfs file system
findfs (8)
- Find a filesystem by label or UUID

, , - findfs. ,
7, , /dev/hda10
.
7.
ian@lyrebird:~> /sbin/findfs LABEL=SLES9
/dev/hda10

, root
findfs.
man,
man -k apropos man -f whatis.
apropos whatis, , .

.
manpath.
MANPATH ,
;
,
. MANPATH,
manpath .
8. MANPATH
[ian@echidna ian]$ manpath
/usr/local/share/man:/usr/share/man:/usr/X11R6/man:/usr/local/man
ian@lyrebird:~> manpath
manpath: warning: $MANPATH set, ignoring /etc/manpath.config
/usr/local/man:/usr/share/man:/usr/X11R6/man:/opt/gnome/share/man

/etc/man.config /etc/manpath.confg.
/etc/man.conf. man.config
( MANPATH), ,
, , 9.

MANPATH
MANPATH
MANPATH
MANPATH
MANPATH

9. MANPATH /etc/man.config
/usr/share/man
/usr/man
/usr/local/share/man
/usr/local/man
/usr/X11R6/man

manpath.config MANDATORY_MANPATH,
MANPATH.
,
, , ,
,
10.
10. MANPATH_MAP /etc/man.config
MANPATH_MAP
/bin
/usr/share/man
MANPATH_MAP
/sbin
/usr/share/man
MANPATH_MAP
/usr/bin
/usr/share/man
MANPATH_MAP
/usr/sbin
/usr/share/man
MANPATH_MAP
/usr/local/bin
/usr/local/share/man

man ,
.

. ,
, . man.config
MANSECT, manpath.config SECTION.
, ,
.
, , , apropos whatis .
,
. ,
makewhatis.
cron.
11. makewhatis
[root@echidna root]# makewhatis

- ,
whatis . /var/cache/man/whatis.
, SUSE

, , makewhatis.


, -t
groff troff.
, stdout.
12 , ls
ls.ps. 4
.
12. ls
ian@pinguino:~$ man -t ls > ls.ps

4. ls

,
-T , , dvi ps.
man.

/usr/share/doc/
info-, , Linux, , .
/usr/share/doc, /usr/doc .
,
, , PDF, PostScript HTML.
,

info-, ,
. 13,
/usr/share/doc , ,
.
13. /usr/share/doc
ian@pinguino:~$ find /usr/share/doc -type f | wc -l
10144

5 HTML- Texinfo,
info, .
5. HTML- Texinfo /usr/share/doc


. 14
pngtopnm. HTML-
/usr/share/doc/packages/netpbm/doc/pngtopnm.html, ,
.
14. pngtopnm
pngtopnm(1)
Netpbm pointer man pages
pngtopnm(1)

pngtopnm is part of the Netpbm package.


kept in HTML format.

Netpbm documentation is

Please refer to
<http://netpbm.sourceforge.net/doc//pngtopnm.html>.
If that doesn't work, also try <http://netpbm.sourceforge.net>
and emailing Bryan Henderson, bryanh@giraffe-data.com.
Local copy of the page is here:
/usr/share/doc/packages/netpbm/doc/pngtopnm.html


, ,
--help, --h --?.
, , .
15 kdesu,
KDE.
15. kdesu
ian@lyrebird:~> man kdesu
No manual entry for kdesu
ian@lyrebird:~> kdesu --help
Usage: kdesu [Qt-options] [KDE-options] command
Runs a program with elevated privileges.
Generic options:
--help
--help-qt
--help-kde
--help-all
--author
-v, --version
--license
--

Show help about options


Show Qt specific options
Show KDE specific options
Show all options
Show author information
Show version information
Show license information
End of options

Arguments:
command

Specifies the command to run.

Options:
-c <command>

Specifies the command to run. []

Linux,
online.

-

, ,
.
Linux Documentation Project
Linux Documentation Project - ,

Linux.
Linux ,
.
LDP :
HOWTO
, , Linux IPv6 HOWTO.
Guides ()
, , Linux -
.
FAQ
Frequently Asked Questions ( ), , Linux
Documentation Project (LDP) FAQ.
man pages ( )
,
.
Linux Gazette
, ,
, , , , ,
.
HTML-
. ,
HTML, PDF, .
LDP ,
.
LDP . ,
, ,
.
LDP Linux,
" LDP".
Web-
Web- Linux
, ,
/ , ,
. :

Redhat Linux - Linux-,


.

SUSE Linux -
Novell.

Asianux - Linux, Haansoft, Inc.,


Red Flag Software Co., Ltd. Miracle Linux Corporation.

Turbolinux - ,
Linux .

Yellow Dog Linux Terra Soft Solutions -


Apple PowerPC ,

PowerPC Cell.
Linspire - Linux,
.
Slackware Linux Project (Patrick Volkerding)
1993 "UNIX-" .
Debian GNU/Linux 1993 ,
Linux GNU.
Ubuntu Linux - Linux, Debian.
:
Kubuntu (, KDE), Edubuntu
( ) Xubuntu ( ,
Xfce).
Gentoo Linux - ,

.
.
Mandriva - , .

, Mandrakesoft
, Conectiva , Edge IT Lycoris .


Linux DistroWatch.com.
,
, , .


Linux .
, Linux,
, ,
Linux- Linux. :

IBM Linux
SGI Linux
HP Linux
Sun Linux
StarOffice Sun
Oracle Linux
BEA Linux


,
.
, Apache Software Foundation. :

Apache Software Foundation - Web- Apache


.

Eclipse Foundation -

.
OpenOffice.org -
.
GNOME Foundation - GNOME.
KDE project - KDE (K Desktop Environment).


SourceForge.net. , , ,
, , , ,
.. ,
, (
),
.

, Linux-,
IBM developerWorks Linux, ,
Linux-.
,
Web. :

LinuxWorld.com

Slashdot

freshmeat

Linux Magazine ( )

Linux+ ( )


, ,
. (bulletin board),
,
.
NNTP (Network News Transfer Protocol),
IETF RFC 997 ( 1986).
, ,
NNTP-.
Linux, evolution, gnus, pan, slrn, thunderbird tin.
, .
,
, ,
.
Usenet - .
, , comp , sci
rec , .

, ,
, , Linux,
comp.os.linux. LDP.
- (Internet Service Provider), ,
,
, .
, ,
.
6 comp.os.linux, ISP.
Mozilla
Thunderbird. ,
.
.
6. comp.os.linux.*

.
Deja News. ,
Google
Google Groups.
Web-.
, ,
. Linux
Web- IBM developerWorks,
.

, ,
Linux-. ,
, , .

,
, ,
.
Linux Kernel Mailing List.
,
.
,
. (flood)
,
- ,
, .


. ,
.
,
.
LKML FAQ, ,
,
, .
, . ,
. ,
, ,
.




, .
ASCII UNIX. ,

GNOME KDE,
.
/etc/issue and /etc/issue.net

, /etc/issue /etc/issue.net, ASCII-,


(/etc/issue) (/etc/issue.net). 16
, Fedora Core 5.
16. /etc/issue /etc/issue.net
[ian@attic4 ~]$ cat /etc/issue
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m

[ian@attic4 ~]$ cat /etc/issue.net


Fedora Core release 5 (Bordeaux)
Kernel \r on an \m
[ian@attic4 ~]$

\r \m.
.
4; ,
mingetty.
4. /etc/issue /etc/issue.net

\d


localtime

\l

,
mingetty

\m


( uname -m)

\n


( uname -n)

\o

\r


(
uname -r)

\t


localtime

\s

\u \U


; \U "n
", \u "n"

\v


( uname -v)

, , , 16,
.
telnet
/etc/issue.net ,
17.
17. Telnet- /etc/issue.net
Fedora Core release 5 (Bordeaux)
Kernel 2.6.17-1.2174_FC5 on an x86_64
login: ian
Password:

/etc/issue.net

, 18,
, 19.
18. /etc/issue.net
[ian@attic4 ~]$ cat /etc/issue.net
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m
\n
Date \d
Time \t

19. telnet
Fedora Core release 5 (Bordeaux)
Kernel 2.6.17-1.2174_FC5 on an x86_64
localhost.localdomain
Date 22:55 on Friday, 15 September 2006
Time 22:55 on Friday, 15 September 2006

login: ian
Password:

, \d \t
. , \u, \U
. , , ,
.
telnet .
, ssh ,
, , ASCII-
, /etc/issue.net ,
, .
/etc/issue ,
. ,
( ),
Ctrl-Alt-F1 Ctrl-Alt-F6, Ctrl-Alt-F7
.

/etc/issue, /etc/issue.net

, , .
motd,
/etc/motd. /etc/motd
, . 20

motd, 21 , /etc/issue.net
, telnet-.
20. (motd)
[ian@attic4 ~]$ cat /etc/motd
PLEASE NOTE!
All systems will shut down this weekend for emergency power testing.
Save your work or lose it.

21. (motd)
Fedora Core release 5 (Bordeaux)
Kernel 2.6.17-1.2174_FC5 on an x86_64
localhost.localdomain
Date 22:55 on Friday, 15 September 2006
Time 22:55 on Friday, 15 September 2006

login: ian
Password:
Last login: Fri Sep 15 22:54:18 from 192.168.0.101
PLEASE NOTE!
All systems will shut down this weekend for emergency power testing.
Save your work or lose it.
[ian@attic4 ~]$

, motd ASCII. KDE, GNOME


.
, ,
wall,
, , stdin. ,
, GNOME
KDE.