I should probably clarify what “raw” means. It gives access to the contents of the disk as a stream of bytes. Not files or directories or anything like that, just bytes. To view the actual filesystem contents, this stream needs to be mounted somewhere.

So, /dev/sda (SCSI Disk A) is the first hard drive, totally raw. /dev/sda1 is the first partition on that drive, also raw. To access its contents, it’s typically mounted on “/”, the root of the filesystem namespace. This is basically the equivalent to drive C:\ in Windows.

Then the drive letters go up from there… /dev/sdb, /dev/sdc, /dev/sdd, etc. If any partitions exist, they’ll be indicated by a number after the letters.

To see what is currently mounted, run “mount”. Or click on whatever GUI option is equivalent to the “My Computer” icon. Many GUIs put mounted disks on the desktop by default. (As a caveat, “mount” shows all sorts of stuff including internal bookkeeping filesystems, so to see only actual disks, one can do “mount | grep /sd” or “mount | grep ^/dev”.)

Two things:

  • Up arrow. Previous commands can be recalled and edited by pressing Up.
  • Tab completion. Most things can be auto-completed by pressing tab. It also will often display a list of complete-able items by pressing tab by itself. Or after displaying a list, keep pressing tab to make the shell auto-complete the items one at a time in order, if you don’t feel like typing any more letters.

Let’s say I wanted to play some music. Here’s what I could type:

  1. Fn-Home
  2. cd mu<tab><tab>a<tab>
  3. <tab>
  4. In<tab><enter>
  5. mp -shuffle /*

Here’s what each step does, and what I see onscreen:

  1. A terminal opens.
  2. Expands to:
    • cd mu
    • cd music/
    • cd music/by_
    • cd music/by_artist/
  3. Press tab one more time to display a list of artists.
  4. Expands and then changes directory:
    • cd music/by_artist/Infected_Mushroom/
  5. Tells my favorite music player to play all files below the current directory in random order. The actual program changes over time, but I can always access it, whatever it is, by running “mp”. It’s a shell alias.

Then let’s say I stop that and decide I want to play an album called “The Voyage”, but I don’t recall the name of the artist who made it.

  1. q
  2. …/*/*Voy*<enter>
  3. <up><up><enter>

What this does is:

  1. [Q]uit the music player.
  2. Search for the album and go to its directory. I could optionally press tab before enter, to make the shell expand it to its full name, “…/Haywyre/2012.The_Voyage”. Also, normally there would be a “cd ” at the beginning of this line, but since changing directory is such a common operation, some shells allow the user to omit the “cd ” part entirely.
  3. Recall the “mp -shuffle /*” command and run it again.

However, since this particular album is meant to be played in sequential order, I’d probably just run “mp *” to play everything in order. But if I wanted to recall the shuffle command later, I could do it without having to scroll through all previous commands, by hitting Ctrl-r then “shuf” to search command history for “shuf”.

I hope this gives a relatable example of how a modern CLI works for a common task, and how little actual typing is required.