Forrest logo
tool overview
On this page you find all important commands for the CLI tool mkfs. If the command you are looking for is missing please ask our AI.

mkfs

The "mkfs" command-line tool is used to create a file system on a storage device or a partition. It stands for "make file system." The tool is commonly available in various operating systems, including Linux, Unix, and their variants.

When utilizing "mkfs," users can specify options and parameters to define the type of file system to create, such as ext4, NTFS, FAT32, or XFS. Each file system has its own features, strengths, and compatibility with different software and operating systems.

The key purpose of "mkfs" is to format the selected storage device or partition with the desired file system, preparing it for data storage and retrieval. Formatting involves organizing the disk space, creating metadata structures, and setting up a directory hierarchy for files and directories.

By running the "mkfs" command, users usually determine the size of the file system, block size, inode size, and other relevant parameters that affect file system performance and storage efficiency.

It is crucial to exercise caution when employing "mkfs" as the command alters the storage device's file system entirely. Any existing data on the device will be erased during the formatting process, making it essential to double-check the device to be formatted to avoid losing valuable data.

Overall, "mkfs" serves as a powerful tool for managing disk storage by creating file systems tailored to specific needs, providing data organization, and enabling efficient storage utilization.

List of commands for mkfs:

  • mkfs:tldr:3d74d mkfs: Build a filesystem of a specified type.
    $ mkfs -t ${ext4} ${path-to-partition}
    try on your machine
    explain this command
  • mkfs:tldr:5ede2 mkfs: Build a filesystem of a specified type and check for bad blocks.
    $ mkfs -c -t ${ntfs} ${path-to-partition}
    try on your machine
    explain this command
  • mkfs:tldr:6934d mkfs: Build a Linux ext2 filesystem on a partition.
    $ mkfs ${path-to-partition}
    try on your machine
    explain this command
tool overview