• 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.vfat: command not found

by Deepika

“mkfs.vfat” is a command-line utility that creates a Virtual File Allocation Table (VFAT) filesystem on a partition or disk. VFAT is an extension of the original FAT file system developed by Microsoft, and is designed to be backward-compatible with older systems while also supporting long file names and larger partition sizes. The “mkfs.vfat” 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, and should be compatible with most operating systems that support FAT file systems. VFAT 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.

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

mkfs.vfat: 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.vfat Command Examples

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

# mkfs.vfat /dev/sdb1

2. Create filesystem with a volume-name:

# mkfs.vfat -n volume_name /dev/sdb1

3. Create filesystem with a volume-id:

# mkfs.vfat -i volume_id /dev/sdb1

4. Use 5 instead of 2 file allocation tables:

# mkfs.vfat -f 5 /dev/sdb1

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to enable the automatic extension for a thin LVM volume
  2. How to use ipset Command in Linux
  3. id: command not found
  4. bpftool Command Examples in Linux
  5. CentOS / RHEL : How to restrict SSH login by time of day
  6. updatedb: command not found
  7. nping: command not found
  8. How to install rsyslog7 when rsyslog5 is already installed in CentOS/RHEL
  9. Beginner’s Guide to LVM (Logical Volume Management)
  10. pacman Command Examples in Linux (Cheat Sheet)

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright