Enable and Disable USB Ports

Enable and Disable USB Ports

USB flash drives, MP3, or MP4 devices are widely used everywhere however it can be harmful for computers when these portable devices become compromised by viruses. You can prevent this by disabling the USB ports.

How to enable and disable USB ports on Windows 10? 

To disable USB ports follow these steps:

1. Click "Start" then click "Run".

2. Type "regedit" to open Registry Editor, and then click "OK".

3. Search for the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor

4. At your right, double-click "Start".

5. In the Value data box, type 4, click Hexadecimal, and then click "OK".

6. Close Registry Editor and restart the machine.

To reverse this process and enable a USB port, follow the above instructions but in step 5, change the number from 4 to 3.

How to enable and disable USB ports on Mac?

The situation is different with Mac. You can disable all ports at the same time.

1. Launch Finder.

2. From the top menu, select Go and from there, choose Go to folder.

3. Go to the following folder: /System/Library/Extensions

4. Find the following files: IOUSBMassStorageClass.kext and IOFireWireSerialBusProtocolTransport.KEXT

5. Create a backup folder, then copy and past these two files there - this is mandatory.

6. Go back to the original folder and switch to Grid view. 

7. Type IO in the search bar.

8. Press the Return button

9. Select Search: "Extensions".

10. Find the  IOUSBMassStorageClass.kext and IOFireWireSerialBusProtocolTransport.KEXT files. If you haven't done a backup yet, create a backup.

11. Now that you have a backup, delete the files and clear the bin.

12. Restart your computer.

Remember to never delete those files without doing a backup copy. This solution works for MacBook Pro, Air: macOS Monterey, Big Sur, Catalina, and Mojave. To enable back the USB ports, restore the two files from your backup folder and restart your computer.

How to disable USB ports on Linux?

1. Open the /etc/modprobe.d folder.

2. Create a file called block_usb.conf and open it.

3. This will give you $ sudo vim /etc/modprobe.d/block_usb.conf

4. Paste install usb-storage /bin/true

5. Save the file. You can now exit.

You have more questions about USB? Check our forum!
Around the same subject