English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux mkfs Command

Linux Command大全

The Linux mkfs command (full English name: make file system) is used to create a Linux file system on a specific partition.

Usage :

mkfs [-V] [-t fstype] [fs-options] filesys [blocks]

Parameters :

  • device : The hard disk partition to be prepared for inspection, for example:/dev/sda1
  • -V : Detailed display mode
  • -t : Specify the type of the file system, the default value of Linux is ext2
  • -c : Check if the partition has bad tracks before making the file system
  • -l bad_blocks_file : Add the block information with bad tracks to the bad_blocks_file
  • block : The size of the given block

Online Examples

In /dev/hda5 Build a msdos file system, and check for bad tracks at the same time, and list the process in detail :

mkfs -V -t msdos -c /dev/hda5

Will sda6Partition formatted as ext3Format

mfks -t ext3 /dev/sda6  

Note:Here is the file system to be specified, for example, ext3 ;reiserfs ;ext2 ;fat32 ;msdos 等。

Linux Command大全