man 프로그램을 이용하면 각종 프로그램 사용법 및 함수 사용법을 알 수 있다. 만약 man 프로그램 사용법을 알고 싶으면 아래와 같이 실행하면 된다.
# man man
man(1) man(1)
NAME
man - format and display the on-line manual pages
SYNOPSIS
man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C config_file]
[-M pathlist] [-P pager] [-B browser] [-H htmlpager] [-S section_list]
[section] name ...
DESCRIPTION
man formats and displays the on-line manual pages. If you specify sec-
tion, man only looks in that section of the manual.<<생략>>
C 언어의 printf 사용법을 알고 싶어서 아래와 같이 실행하면 C 언어의 printf 사용법이 아닌 printf 프로그램의 man 페이지를 보여준다.
# man printf
PRINTF(1) User Commands PRINTF(1)
NAME
printf - format and print data
SYNOPSIS
printf FORMAT [ARGUMENT]...
printf OPTION
DESCRIPTION
Print ARGUMENT(s) according to FORMAT. <<생략>>
C 언어의 printf 사용법을 보려면 man 프로그램을 아래와 같이 실행해 주어야 한다.
# man 3 printf
PRINTF(3) Linux Programmer's Manual PRINTF(3)
NAME
printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf,
vsnprintf - formatted output conversion
SYNOPSIS
#include <stdio.h>
int printf(const char *format, ...); <<생략>>
이는 유닉스 매뉴얼에는 섹션 번호가 있기 때문이다. 상단에 위치한 man 프로그램의 man 페이지를 보면 굵은 색으로 표시한 것이 섹션 번호를 이용하여서 man 페이지를 보는 방법이 기술된 곳이다.