• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Uncategorized / How To Use Free Command In Linux Command Line With Examples

How To Use Free Command In Linux Command Line With Examples

By Sourabh / December 10, 2024 Category: Uncategorized

How to format USB pendrive in Ubuntu terminal. This tutorial explains how on Ubuntu, you can format USB fat32 via command line.

The first step to format pendrive in Ubuntu terminal is to identify the USB drive. To get the info about the USB, run the following command in terminal:

$ df -h

In the output of the above command, the last line in the output lists /dev/sdb1 is the USB drive.

Once you are aware of the USB drive name and mount point you can format the USB. Note that you can only format an unmounted USB drive. Otherwise, you will get the message “Make file system with mkfs command.”

To unmount the drive through the following command:

$ sudo umount /dev/sdb1

Once the command is executed, the USB drive will be successfully unmounted.

To format the USB, use one of the following commands as per the file system you want.

Many people prefer VFAT and NTFS file systems to format a USB drive because they can be easily used on the Windows operating system and Linux as well.

There are three popular USB file systems which are popularly used:

  1. File Allocation Table (FAT) was the default filesystem for MS-DOS and Windows 9x operating systems and it was (FAT) was replaced with NTFS as the default file system on Microsoft Windows XP operating systems and onwards. FAT is still popular and used on USB flash drives because of its compatibility and ease of implementation. FAT32 is the 32-bit version of the file allocation table (FAT) file system which specifies the protocol for storing and organizing data on a hard drive with file names and certain permissions.
  2. NTFS stands for New Technology File System. It was first used by Windows NT operating system (OS) for storing and retrieving files on hard disk drives (HDDs) and solid-state drives (SSDs). NTFS supports the Windows NT security model and supports multiple data streams.
  3. ext4 (fourth extended filesystem) is a journaling file system for Linux and under this file system, drives up to 16 TB can be connected. The ext4 filesystem can support volumes with sizes in theory up to 64 zebibyte (ZiB). One of the greatest feature of ext4 is – ext4 does not limit the number of subdirectories in a single directory. It is noteworthy to point out that in ext3 a directory can have at most 32,000 subdirectories.

To format a USB drive as per your desired file system, run the following command:

To format a USB drive with vFat File System

sudo mkfs.vfat /dev/sdc1

To format a USB drive with NTFS File System

sudo mkfs.ntfs /dev/sdc1

To format a USB drive with EXT4 File System

sudo mkfs.ext4 /dev/sdc1

That’s all. I hope you have learned to format a USB drive on a Linux system via the commandline.

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap