Skip to main content

2.2 GHz (Turbo Boost up to 3.4 GHz) or 2.5 GHz (Turbo Boost up to 3.7 GHz) quad-core Intel Core i7 processor with 6MB shared L3 cache.

467 Questions View all

How can I reset my USB ports via Terminal?

So I've made a stupid mistake by messing around with Terminal trying to fix a dodgy USB stick. I entered some commands such as "diskutil eraseDisk HFS+ newdisk disk2" from this website http://hints.macworld.com/article.php?st..., trying a few different options without fully understanding what I was doing. Now anything I plug into either USB 3.0 ports gets the message "The disk you inserted was not readable by this computer". USB drives and hard drives that worked before now no longer work.

I've tried resetting SMC and PRAM to no avail. Would rather not format the whole system as I can't do a more recent backup to HDD beforehand now. But if it comes to it, will this fix the problem?

Can someone tell me what commands to enter into terminal to set these ports back to what they were before I started messing with it?

Answer this question I have this problem too

Is this a good question?

Score 0

2 Comments:

@jwesterink Does the USB drive show up in Disk Utility?

by

Try to install clean OS to you computer but before doing so make sure you have created backup of your computer and keep it a safe place. or contact apple support at

(877) 232 0717

by

Add a comment

3 Answers

sudo kextunload IOUSBMassStorageClass.kext;

sudo kextload /System/Library/Extensions/IOUSBMassStorageClass.kext

There are other better more effective ways to do this outside of terminal but I assume you cant get into the computer in the first place otherwise you wouldnt be asking for a terminal command.

Was this answer helpful?

Score 0

1 Comment:

This should reset the USB ports to factory settings

by

Add a comment

A way to do it outside of terminal is:

  1. Press the  icon in top left of screen
  2. Click Shutdown
  3. Turn on the Mac while holding down the Command-Option-P-R keys until you hear the second start-up sound.
  4. Release the Command-Option-P-R keys.
  5. or
    1. Press the  icon in top left of screen
    2. Click Shutdown
    3. Disconnect the MagSafe power adapter from the computer
    4. Remove the battery
    5. Press and hold the power button for 5 seconds
    6. Release the power button
    7. Reconnect the battery and MagSafe power adapter
    8. Press the power button to turn on the computer
  6. or
    1. Press the  icon in top left of screen
    2. Click Shutdown
    3. Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
    4. On the built-in keyboard, press the (left side) Shift-Control-Option keys and the  power button at the same time.
    5. Release all the keys and the power button at the same time.
    6. Press the  power button to turn on the Mac laptop.
  7.  IF those dont work comment on one of my posts and I will give more methods

Was this answer helpful?

Score 0
Add a comment

The USB doesn’t work, so I cant use any key combination. I thought there might be a way to use the on/off button without rebooting it?

Currently I try to use bluetooth mouse and keyboard to type resetusb (after adding to the profile: alias resetusb='sudo launchctl stop com.apple.usbd; sudo launchctl start com.apple.usbd')

as someone suggested.

Was this answer helpful?

Score 0
Add a comment

Add your answer

James will be eternally grateful.
View Statistics:

Past 24 Hours: 6

Past 7 Days: 24

Past 30 Days: 118

All Time: 13,910