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:
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.
- How to enable usb port in windows 10 using command prompt
- How to disable usb port in windows 10 using command prompt
- How to enable usb port in windows 7 using command prompt
- Remove write protection: from USB, SD card, hard drive > Guide
- How to enable USB port? [solved] > Forum - Pen Drive/USB Key/SD Card
- Clear RAM on Windows: via cmd, shortcut, without rebooting > Guide
- Windows - Customize the Command prompt
- Reset Windows password: via cmd, without logging in > Guide
- Cannot open files on USB flash drive: how to access them
- Connect two computers: with USB cable, ethernet, WiFi
- USB drive showing shortcuts only
- Create a bootable USB drive
- How to format USB drive: Mac, Windows, Ubuntu
- Update PS4 with a USB
- USB Flash drive not detected: in Windows, Mac
- Customize USB drive wallpaper on Windows 7
- Add a high speed USB host controller
- Clean out the USB port: phone, laptop, PS4