• 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 Examples in Linux

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.

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. How to log every shell command in Linux
  2. iwconfig Command Examples in Linux
  3. dnstracer Command Examples in Linux
  4. Running repairs on XFS Filesystems
  5. e2label: command not found
  6. mkfs.btrfs: command not found
  7. feedreader Command Examples in Linux
  8. How to find docker storage device and its size (device mapper storage driver)
  9. semanage Command Examples in Linux
  10. Echo Command with Practical Examples

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