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