Mkfs

From LQWiki
(Redirected from Create a file system)
Jump to navigation Jump to search

mkfs is the Unix command to make a filesystem. It creates a new filesystem on a disk partition, erasing all data. For example:

mkfs -t ext3 /dev/sdb1

creates a new Ext3 filesystem on the /dev/hdb1 partition, which is the first partition on your second disk drive. NOTE: in modern kernels the order of drives depends on how quickly they are recongized at startup, and thus can vary on each reboot; BEWARE.

WARNING: this is easy to get wrong and is quite dangerous. Accordingly it is recommended that you use one of the more friendly programs (names ending in 'part') listed in the see-also section below, although none of these is entirely foolproof. Just try not to be a fool.

Provided by

Most (all?) Linux distributions incorporate this from the [util-linux] project.

See also

This article is a stub and needs to be finished. Plunge forward and help it grow!