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