Linux virtual machine VirtualBox USB Device Settings

Source: Internet
Author: User

1. When the VirtualBox and expansion packs are installed, the system will automatically generate Vboxusers user groups, add their own usernames to the Bvoxusers group, or you will not be able to use VBox.
sudo usermod-g vboxusers your_user_name

2. Using a USB device:

Turn on the USB device option in the VirtualBox virtual machine configuration panel and tick the "Start USB controller" "Enable USB2.0 Controller" option separately.

1, the simplest method is as follows:
$ sudo gedit/etc/fstab
At the end, add
# The USB group
# Open and write access to USB devices for all users
None/proc/bus/usb Usbfs devmode=666 0 0
The USB device can then be used by LIBUSB for normal users.

2. However, the way to open the read and write permissions of USB devices to all users is less secure in some cases, and it is more prudent to:
1. Add User group name
$ sudo groupadd name
2. View GID for the USBFS user group
$ Cat/etc/group | grep name
NAME:X:1002:
3. Add the current user to the USBFS group
$ sudo gedit/etc/group
Put
NAME:X:1002:
Revision changed to
Name:x:1002:name2
4. To reset the permissions for the USB device edit the/etc/fstab file, add the following two lines, note that your GID may not be 1002
$ sudo gedit/etc/fstab
At the end, add
# 1002 is the USB group ID
None/proc/bus/usb Usbfs devgid=1002,devmode=664 0 0
5. After restarting, you should be able to use the USB device in the client computer.
Note: You should uninstall the USB device in the host computer before using it.

Cat/etc/group grep vboxusers

Vboxusers:x:123:name #此时可以查看到name以及被加到此用户组了

sudo gedit/etc/fstab #编辑fstab文件

In the last line, add the following command to save

None/proc/bus/usb Usbfs devgid=1001,devmode=664 0 0

#none/proc/bus/usb Usbfs devgid=1

Linux virtual machine VirtualBox USB Device Settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.