Updates from April, 2017 Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 6:10 pm on April 30, 2017 Permalink | Reply  
    Categories: How To ( 33 ), Mac OS X ( 35 )   

    How to mount and unmount drives in macOS and OS X from the command line 

    Unmounting external drives on a Mac is usually done quick and simple by either dragging drive icon to the trash, or by using the eject symbol in a Finder window. Mounting usually happens automatically when a new drive is inserted into a USB port or SD card slot.

    However, there is a way to do this via the command line, of which I am a big fan. Fire up a Terminal session and see how to do it.

    Listing available drives

    To see what’s currently attached to your Mac, let’s use the diskutil command, followed by the word list. You’ll see output like this:

    diskutil list
    
    /dev/disk0 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *512.1 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh SSD           511.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    
    /dev/disk1 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk1
       1:                        EFI EFI                     209.7 MB   disk1s1
       2:                  Apple_HFS Mac HDD 1TB             999.9 GB   disk1s2
    
    /dev/disk2 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *1.0 TB     disk2
       1:                  Apple_HFS VM Drive 
    

    Attached drives are listed with their physical locations on the left (i.e. /dev/disk0, /dev/disk1, etc), as well as with their respective partitions if available on the right (like disk0s1, disk1s2, etc). Make a mental note of the latter: you’ll see that we have a physical disk (like disk0), on which several partitions may have been created. It is those partitions we’ll mount and unmount, NOT the physical drive.

    Unmounting an attached hard drive

    On my system I have two internal hard disks (disk0 and disk1), and one external USB drive (disk2). Let’s unmount that USB drive now:

    diskutil unmount /dev/disk2s1
    
    Volume VM Drive on disk2s1 unmounted
    

    Note how we use the unmount command. We need to specify the location of the partition with its full path (i.e. /dev/disk2s1).

    Mounting an attached hard drive

    To mount the drive again, without having to take it out and plugging it in again, I can issue this command:

    diskutil mount /dev/disk2s1
    
    Volume VM Drive on /dev/disk2s1 mounted
    




     
    • Barry 1:01 pm on December 5, 2017 Permalink | Reply

      Hi, Jay! How can I execute unmount script when I close the lid (sleep) of my mac and execute mount script when I open the lid (wakeup)?

      • Jay Versluis 11:42 am on January 20, 2018 Permalink | Reply

        Hi Barry – oh, that’s a good question. I wish I knew, it would be a very useful option indeed. Sadly I don’t know the answer, but let’s keep our eyes and ears open. If I find a way to do it, I’ll let you know. If you find a solution, please share it here.

        All the best,

        JAY

  • Jay Versluis 6:02 pm on April 14, 2017 Permalink | Reply
    Tags: EFI   

    Categories: Bookmarks ( 18 ), Linux ( 100 ), Windows ( 22 )   

    Format a Linux system drive on Windows 

    The other day I tried to format a USB drive for use with Windows. I had previously tried this on my Mac to no avail. But now even Windows was telling me that it too could not format my drive.

    I was stumped! I had in fact never seen anything like it before. Was that USB drive broken? Had I turned stupid overnight? Well perhaps… but more importantly, it dawned on me what I had used this USB drive prior to this formatting nightmare: it was a Linux installation that could run directly from the stick.

    This is important, because as part of the installation, a protected EFI system partition is installed. This is used for booting if I understand correctly, and hence rather important. So important in fact that the ordinary user tools in both macOS and Windows do not allow us users (even Administrators) to erase such partitions.

    Lucky for us, the friendly folks at WinAbility have provided a detailed guide on how to remove such a protected partition on Windows. Enjoy the article!





     
  • Jay Versluis 4:54 pm on April 12, 2017 Permalink | Reply
    Tags:   

    Categories: Linux ( 100 ), Mac OS X ( 35 ), Windows ( 22 )   

    What’s the difference between the Logitech M325 and the M325c 

    The Logitech M325 and M325c are both wireless USB mice. Their design appears to be identical (except for the many different colourful variations of course), and their prices vary from anything between $12 and $60 – depending the layout and seller. Even the packaging is identical.

    So what’s the difference between these two models? Is it precision? Is it the build quality? Is it the year of production? Is it something else?

    Actually no, the two mice are absolutely identical and both work with Windows, macOS and Linux. The only difference is in the wireless receiver that Logitech give you with each model.

    The difference is the wireless receiver

    The M325 comes with a Logitech Unifying Receiver. You can tell by the little “sunshine” logo on the side. This type of receiver allows us to use the Logitech Unifying Software to operate several devices over a single receiver (say a mouse and a keyboard). It’s a little clunky to setup more than one device, but it certainly saves valuable USB slots on your machine.

    Note that for this to work, all decides must be Logitech unifying devices, and all must display that little sunshine logo.

    The M325c on the other hand does NOT come with a unifying receiver, and instead comes with a standard USB receiver. Only this one device will work with said receiver. As you can imagine, the receiver does not bear the unifying logo on the side. Therefore you may find the M325c a little cheaper than the M325.

    Note however that the M325c mouse itself IS a unifying device, and it DOES bear the unifying logo on the underside. Hence you can use the M325c mouse with another unifying receiver just fine.

    So there you have it – that’s the big secret difference between these two mice. I have both, and I couldn’t tell the difference at first. The mice are identical, just the USB receiver is a little different. Just in case this question was driving you crazy too 🙂





     
    • me 6:32 pm on May 26, 2017 Permalink | Reply

      thank you for this simple and complete explanation

      • Jay Versluis 4:28 pm on May 27, 2017 Permalink | Reply

        You’re very welcome – it has been bugging me too 🙂

    • KY 11:50 pm on September 8, 2017 Permalink | Reply

      Thank you so much. Your article helped clear up the difference.

    • zulker 9:56 pm on November 25, 2017 Permalink | Reply

      Thanks you so much for the details! It was bugging me so much and literally was making me nuts! 🙂

  • Jay Versluis 11:51 am on April 8, 2017 Permalink | Reply
    Tags: ,   

    Categories: Linux ( 100 ), Windows ( 22 )   

    How to check which web server is running on a domain 

    Sometimes we must know what web server is running on a particular domain. Usually web hosts should be able to tell a client this, but if the client is afraid to ask, there is a way to ask the web server directly for this information.

    Just to clarify: the web server is the process that serves files (HTML, PHP, ASP, images, etc) from a remote machine to your local web browser. The most likely choices in this day and age (2017) are Apache, NGINX or IIS. The latter is used by Windows servers, and the two former are used by Linux servers. There are other web servers too, such as lighttpd, but they’re used less commonly.

    By asking the web server for this information, we can tell exactly who’s serving those files.

    How to ask the Web Server

    Let’s open a Terminal or Command Line Prompt window and utilise the good old fashioned Telnet protocol. Replace yourserver.com with the actual domain in question: (More …)





     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel