0

In this tip we will see how to use the command line to create an .img file under a system running Ubuntu or any other Linux-based system. We will also see how to format an .img file to any of the following file system formats:

  • ntfs
  • ext2/ext3/ext4
  • vfat
  • fat32
  • xfs
Open now the terminal and run this command to create the .img file:

dd if=/dev/zero of=output.img bs=1M count=1024

output.img ---> the name of the file that will be created.

1024 ---> size of the .img file in KB, set any size of your choice.

You can then format this image file to any of these file system formats:

EXT2/EXT3/EXT4:

mkfs.ext3 -F output.img

vFAT:

mkfs.vfat -F output.img

XFS:

mkfs.xfs -F output.img

FAT32:

mkfs.fat32 -F output.img

NTFS:

mkfs.ntfs -F output.img

Post a Comment

 
Top