Linux 101 : Formatting, mounting and using a USB flashrive



To check that a USB flash drive was recognized by a Linux system, we use the "lsusb" command:


To show the disks and their partition, we could use the below command:


We notice that the mountpoint is blank, because our device is not mounted yet, so we can't use it.

We start by formatting our USB device "/dev/sdc1" with the ext3 filesystem:


Our new formatted filesystem has a Universally Unique Identifier (UUID). 

This UUID identifies filesystems in the "/etc/fstab" file - include filesystems to be mounted

In order to be able to use our filesystem, we have to mount it. 
We pick a directory for example "/mnt".

We could check before if "/mnt" is not already in use using the command:


We mount our formatted USB drive using the following:


We could check if it was correctly mounted using the following:


We could then access our USB drive and create a directory inside it using the commands:

Comments

Leave as a comment:

Archive