How to format a USB drive with Ubuntu so I can use ext4 in my Tesla

Partitioning: > mktable msdos > mkpart primary 1M 100% > quit sudo partprobe /dev/sdx sudo parted /dev/sdx Formatting: sudo mkfs -t ext4 /dev/sdx1 Mounting: sudo mkdir /media/stick-mount sudo mount /dev/sdx1 /media/stick-mount Making a directory: sudo mkdir /media/stick-mount/TeslaCam Unmounting: sudo umount /media/stick-mount sudo rmdir /media/stick-mount Force flushing any unwritten changes to disk so it’s definitely safe to pull out: sync Credit: