• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

mkfs.fat: command not found

by Deepika

“mkfs.fat” is a command-line utility that creates a Microsoft File Allocation Table (FAT) filesystem on a partition or disk. This filesystem is commonly used on removable drives and other storage devices that need to be compatible with different operating systems, including Microsoft Windows, macOS, and Linux. The “mkfs.fat” command initializes the partition, creates the necessary file and directory structures, and writes the boot sector and other required information to the partition. After the process is complete, the partition is ready to be used to store and access files.

If you encounter the below error while running the command mkfs.fat:

mkfs.fat: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install dosfstools
Ubuntu apt-get install dosfstools
Alpine apk add dosfstools
Arch Linux pacman -S dosfstools
Kali Linux apt-get install dosfstools
CentOS yum install dosfstools
Fedora dnf install dosfstools
OS X brew install dosfstools
Raspbian apt-get install dosfstools

mkfs.fat Command Examples

1. Create a fat filesystem inside partition 1 on device b (`sdb1`):

# mkfs.fat /dev/sdb1

2. Create filesystem with a volume-name:

# mkfs.fat -n volume_name /dev/sdb1

3. Create filesystem with a volume-id:

# mkfs.fat -i volume_id /dev/sdb1

4. Use 5 instead of 2 file allocation tables:

# mkfs.fat -f 5 /dev/sdb1

Filed Under: Linux

Some more articles you might also be interested in …

  1. Hostname change not reflecting in sar report for CentOS/RHEL
  2. cmake: Cross-platform build automation system, that generates recipes for native build systems
  3. postfix Command Examples in Linux
  4. setenforce: command not found
  5. How to Change Default Port of Apache On RHEL/CentOS 7
  6. Understanding the /etc/exports File
  7. CentOS / RHEL : How to determine which SNMP version is being used
  8. How to Setup VNC Server for New User in CentOS/RHEL 5
  9. virt-xml-validate: command not found
  10. How to Delete Duplicate Rules in Routing Policy Database in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • csslint: A linter for CSS code
  • csh: The shell (command interpreter) with C-like syntax (Command Examples)
  • csc: The Microsoft C# Compiler (Command Examples)
  • crystal: Tool for managing Crystal source code

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright