Keyboard shortcut to mount eject drive

Joined
Jul 9, 2016
Messages
27
Reaction score
0
Points
1
I have dual internal drives in my 2011 macbook and was wondering if there is anyway to have a keyboard shortcut to mount the drive and eject the extra drive. I found some scripts but I'm not real sure how to get them to run using shortcuts. I have made a couple shortcuts using automator for opening applications and such but wasn't sure if what I want to do is even possible.
 
Joined
Oct 16, 2010
Messages
18,146
Reaction score
1,899
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2020 27" i9 5K nano iMac, 1TB(partitioned) SSD, GB, macOS 15.3.1 Sequoia
OP
J
Joined
Jul 9, 2016
Messages
27
Reaction score
0
Points
1
Thanks for the reply. I was able to setup this as a shortcut

diskutil eject /Volumes/*

But I can't seem to figure out how to mount the drive.
 
Joined
Oct 16, 2010
Messages
18,146
Reaction score
1,899
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2020 27" i9 5K nano iMac, 1TB(partitioned) SSD, GB, macOS 15.3.1 Sequoia
But I can't seem to figure out how to mount the drive.

I'd use the utility mentioned in the howtogeek link.

A simple click in the menu would suit me.




- Patrick
======
 
OP
J
Joined
Jul 9, 2016
Messages
27
Reaction score
0
Points
1
Thanks you're right it works great.

Edit: Like I said the Semulov app worked great but for some reason it slowed everything down like opening finder, opening system preferences, etc.

I uninstalled it and everything went back to normal.
 
Last edited:
Joined
Oct 16, 2010
Messages
18,146
Reaction score
1,899
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2020 27" i9 5K nano iMac, 1TB(partitioned) SSD, GB, macOS 15.3.1 Sequoia
Edit: Like I said the Semulov app worked great but for some reason it slowed everything down like opening finder, opening system preferences, etc.

OK, but that's unfortunate if it was working properly for you.

I don't suppose you happened to check Activity Monitor.app and see what resources it was using???




- Patrick
======
 
OP
J
Joined
Jul 9, 2016
Messages
27
Reaction score
0
Points
1
Sorry I didn't check to see what resources it was using. But after some more searching I did find a script that worked for mounting the drive. I was able to use Automator to set it up and then applied some shortcuts so everything is working fine to mount and unmount the drive.

Thanks again for your help.
 
Joined
Oct 16, 2010
Messages
18,146
Reaction score
1,899
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2020 27" i9 5K nano iMac, 1TB(partitioned) SSD, GB, macOS 15.3.1 Sequoia
Glad to hear you got it all working and don't be afraid to post the details for what you did, some other users may want to do the same thing at some point and would probably appreciate the effort.



- Patrick
======
 
OP
J
Joined
Jul 9, 2016
Messages
27
Reaction score
0
Points
1
Sure.

This command in terminal showed the disk I needed mounted.

diskutil list

Which was "disk1s2" in my case so I opened Automator and choose run shell script with no input. Then I used "diskutil mount /dev/disk1s2" and saved it.

Then I did the same thing with Automator and used "diskutil eject /Volumes/* to eject the drive and saved it. Then went into keyboard shortcuts and chose "services' in the left column and at the bottom of the list was the commands I saved with Automator. I choose "add shortcut" and choose the keyboard shortcuts I wanted.

My apologies if it isn't very clear. If there are any questions please feel free to ask. I'll try to answer the best I can. This was all new to me also.

Also, one of the reasons I wanted to have this setup is I use the extra internal drive as a scratch disk for Photoshop and really just wanted the drive running for that. So the way I have it setup now is I used Automator to set it up that when I use keyboard shortcut to open Photoshop, it also mounts the drive, then when I close Photoshop with the keyboard shortcut it ejects the drive.
 
Last edited:

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top