How do you indetify an USB and get it mounted in your Linux?

I’m using a RaspberryPi to enforce myself to keep learning.

I’ve added an old 8Gb USB stick to the RaspberryPi. The Raspberry runs a very minimal Raspbian Strech Lite without assistants, or graphical interface, not even with the automunt command.

So, how do you identify the USB stick plugged and get it mounted or your Linux?

  1. Plug your USB stick to your RaspberryPi
  2. Run the command blkid as root.
    As an example I type:

    sudo blkid

    … and I get:

    /dev/mmcblk0p1: LABEL="boot" UUID="CDD4-B453" TYPE="vfat" PARTUUID="b1b51741-01"
    /dev/mmcblk0p2: LABEL="rootfs" UUID="72bfc10d-73ec-4d9e-a54a-1cc507ee7ed2" TYPE="ext4" PARTUUID="b1b51741-02"
    /dev/sda: LABEL="USB8GB" UUID="B21F-17E5" TYPE="vfat"
    /dev/mmcblk0: PTUUID="b1b51741" PTTYPE="dos"

    This line identify what device is used by the USB stick just plugged /dev/sda: LABEL="USB8GB" UUID="B21F-17E5" TYPE="vfat"

  3. Now we can mount normally the device by typing:

    sudo mount -t vfat /dev/sda /mnt/

What is the motivation of this post? I’ve to managed myself in order to get mounted the USB stick since the command lsusb gave me a lot of info but no so usefull, or simple, to get it mounted.

Why am i going to “play” with a Rasperry Pi? (Update 31/03/2018)

Why am i going to “play” with a Rasperry Pi? Short answer; for educational purposes.

No the little bit more explained why I decide to sset up a Rasperry Pi, but also going to the point:

  • I’m very bad with hardware, so it’s a little bit challenging for me
  • a very good friend gift me its Raspberry Pi 1 (512Mb RAM) and it was collecting dust
  • I may obtain something useful at the end of the process, for instance, a media server, a little NAS, whatever.
  • I’m going to refresh my former sysadmin skills; file system formatting, installing different OS’s flavours, setting up a network, etc.
  • It’s a wide documented process so it keeps my attention in making the right thing, not in solve a new problem never before seen.

So, again, for educational purposes, mixing up fun with refreshing basic skills.

Update 31/03/2018:
Raspian up & running on an Raspberry Pi 1 model. Reasons for Raspbian:

  • Main reason: It forces me to get out of my usual Red Hat / CentOS / Fedora distro to a Debian based one. I hope this helps me in a future for getting the LP1 Certification
  • General purpose (I’m not looking for a particular functinality), I’m satisfied if it acts as a ssh gateway to the rest of home network
  • Well documented, this is a must since learn something new requires make mistakes. For example, I bought a USB – WiFi here you got how seting WiFi up via the command line, because command line always teches more than graphical interfaces IMHO