HOW TO FORMAT A PARTITION/ DISK OR PEN(FLASH) DRIVE IN UBUNTU OS

Three different ways to format Disk Drives in Ubuntu:
  1. By using Commands in Terminal
  2. By using Disk Utility
  3. By using Gparted Software
1: BY USING COMMANDS IN TERMINAL
Open Terminal (Ctrl + Alt + T) and then enter these Commands:
  • #  sudo su  [to allow admin privileges] 
  • enter you password
  • #  fdisk -l  [this discovers sdXY]
    OR
  • #   df  [lists all your disk drives / partitions in summary]
  • #   udisks --unmount /dev/sdXY  [unmounts device]
  • #   mkfs.vfat /dev/sdXY [formats the device as FAT32]
where X is the alphabet of your device shown after running the command # fdisk -l , or  # df and
          Y is the partition number in disk/device X