Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install VirtualBox in Ubuntu and configure USB device support

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to install VirtualBox in Ubuntu and configure USB device support". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Install VirtualBox

Method 1: download the .deb installation package

Depending on your operating system type, 32-bit (i386) or 64-bit (amd64) go to the official download page provided below to download the. deb installation package:

Https://www.virtualbox.org/wiki/Linux_Downloads

For Ubuntu 14.10, download the installation package for Ubuntu 14.04. After the download is complete, double-click to open the downloaded installation package and choose to open it with Ubuntu Software Center, and then click the install button.

Method 2: add Virtualbox's software source to get subsequent updates

Oracle provides an official software source for Ubuntu Linux, which supports the installation of Ubuntu 10.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04, Ubuntu 13.10, and Ubuntu 14.04 systems

To add software sources, press Ctrl+Alt+T on the keyboard to open a terminal and run the following code:

The code is as follows:

Sudo sh-c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release-cs) contrib" > > / etc/apt/sources.list.d/virtualbox.list'

For Linux Mint, replace the code portion of $(lsb_release-cs) with the name of the system based on the Ubuntu distribution, such as trusty, precise, raring, and so on.

Then download and import the software source key:

The code is as follows:

Wget-Q https://www.virtualbox.org/download/oracle_vbox.asc-O-| sudo apt-key add-

Finally, you can install virtualbox-4.3 through your software manager or by running the following command:

The code is as follows:

Sudo apt-get update

Sudo apt-get install virtualbox-4.3

Add USB device support to VirtualBox terminal environment

After installing VirtualBox, you need to realize the access of the virtual system to the printer and USB disk. At this point, the USB interface needs to be mounted and added to the virtual machine. The process is as follows:

Add usbfs user Group

The code is as follows:

Sudo groupadd usbfs

Add users to usbfs user group

The code is as follows:

Sudo adduser username usbfs

Mounting USB Devic

First of all, you need to determine the group ID to which the user belongs. Use the following command to obtain:

The code is as follows:

Cat / etc/group | grep usbfs

The result should be similar to: usbfs:x:1001:zzxworld, where 1001 is the required group id. Once you have this number, edit the / etc/fstab file and add the USB mount information to the end:

The code is as follows:

None / proc/bus/usb usbfs devgid=1001,devmode=664 00

Next, restart the system to make the configuration in fstab take effect.

Add USB devices to VirtualBox

Plug in the USB device. Use the following command to view the USB devices currently available to VirtualBox:

The code is as follows:

Vboxmanage list usbhost

Normally, you should see output similar to the following:

The code is as follows:

UUID: …

VendorId: …

ProductId: …

Revision: …

Manufacturer: …

Product: …

SerialNumber: …

Address: …

Current State: …

The last three values you need to use are VendorId, ProductId, and SerialNumber. Bind the USB device to the VirtualBox using the following command:

The code is as follows:

Vboxmanage usbfilter add 0-target winxp-name'My USB Dervice'\

-action hold-active yes-vendorid "VendorId"\

-productid "ProductId"-remote no\

-serialnumber "SerialNumber"

Replace the VendorId, ProductId, and SerialNumber in the command with the actual values, and then restart the virtual machine to see the effect.

This is the end of "how to install VirtualBox in Ubuntu and configure USB device support". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report