]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/mkfs.8
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / disk-utils / mkfs.8
CommitLineData
232dc924 1.TH MKFS 8 "June 2011" "util-linux" "System Administration"
6dbe3af9 2.SH NAME
c181c31d 3mkfs \- build a Linux filesystem
6dbe3af9 4.SH SYNOPSIS
726f69e2 5.B mkfs
f49ccec2 6[options]
449a215f 7.RB [ \-t
4ec32f6a 8.IR type "] [" fs-options ] " device " [ size ]
6dbe3af9 9.SH DESCRIPTION
4459245f
KZ
10.B This mkfs frontend is deprecated in favour of filesystem specific mkfs.<type> utils.
11.PP
726f69e2 12.B mkfs
c181c31d
BS
13is used to build a Linux filesystem on a device, usually
14a hard disk partition. The
15.I device
16argument is either the device name (e.g.
7eda085c 17.IR /dev/hda1 ,
039f3531 18.IR /dev/sdb2 ),
c181c31d 19or a regular file that shall contain the filesystem. The
63ab9524 20.I size
c181c31d 21argument is the number of blocks to be used for the filesystem.
6dbe3af9
KZ
22.PP
23The exit code returned by
726f69e2
KZ
24.B mkfs
25is 0 on success and 1 on failure.
6dbe3af9
KZ
26.PP
27In actuality,
726f69e2 28.B mkfs
c181c31d 29is simply a front-end for the various filesystem builders
039f3531 30(\fBmkfs.\fIfstype\fR)
6dbe3af9 31available under Linux.
07b51567
MF
32The filesystem-specific builder is searched for via your PATH
33environment setting only.
c181c31d 34Please see the filesystem-specific builder manual pages for
6dbe3af9
KZ
35further details.
36.SH OPTIONS
37.TP
449a215f
BS
38.BR \-t , " \-\-type " \fItype\fR
39Specify the \fItype\fR of filesystem to be built.
c181c31d 40If not specified, the default filesystem type
5c36a0eb 41(currently ext2) is used.
6dbe3af9 42.TP
039f3531 43.I fs-options
c181c31d 44Filesystem-specific options to be passed to the real filesystem builder.
6dbe3af9 45.TP
449a215f 46.BR \-V , " \-\-verbose"
c181c31d 47Produce verbose output, including all filesystem-specific commands
63ab9524
SK
48that are executed.
49Specifying this option more than once inhibits execution of any
c181c31d 50filesystem-specific commands.
63ab9524 51This is really only useful for testing.
6dbe3af9 52.TP
449a215f
BS
53.BR \-V , " \-\-version"
54Display version information and exit. (Option \fB\-V\fR will display
c181c31d 55version information only when it is the only parameter, otherwise it
449a215f 56will work as \fB\-\-verbose\fR.)
6dbe3af9 57.TP
449a215f 58.BR \-h , " \-\-help"
b4362b6f 59Display help text and exit.
6dbe3af9
KZ
60.SH BUGS
61All generic options must precede and not be combined with
c181c31d 62filesystem-specific options.
b5ab5bec 63Some filesystem-specific programs do not automatically
726f69e2 64detect the device size and require the
449a215f 65.I size
726f69e2 66parameter to be specified.
6dbe3af9
KZ
67.SH AUTHORS
68David Engel (david@ods.com)
69.br
920d44f5 70Fred N.\& van Kempen (waltje@uwalt.nl.mugnet.org)
6dbe3af9 71.br
726f69e2
KZ
72Ron Sommeling (sommel@sci.kun.nl)
73.br
6dbe3af9 74The manual page was shamelessly adapted from Remy Card's version
c181c31d 75for the ext2 filesystem.
6dbe3af9 76.SH SEE ALSO
920d44f5 77.na
7eda085c
KZ
78.BR fs (5),
79.BR badblocks (8),
726f69e2 80.BR fsck (8),
7eda085c
KZ
81.BR mkdosfs (8),
82.BR mke2fs (8),
63cccae4 83.BR mkfs.bfs (8),
726f69e2 84.BR mkfs.ext2 (8),
63cccae4 85.BR mkfs.ext3 (8),
26b4e7a5 86.BR mkfs.ext4 (8),
7eda085c
KZ
87.BR mkfs.minix (8),
88.BR mkfs.msdos (8),
63cccae4 89.BR mkfs.vfat (8),
556c9c48 90.BR mkfs.xfs (8)
920d44f5 91.ad
86d62711 92.SH AVAILABILITY
601d12fb 93The mkfs command is part of the util-linux package and is available from
d673b74e 94https://www.kernel.org/pub/linux/utils/util-linux/.