Installing linux guest additions and setting system permissions

Installing linux guest additions and setting system permissions

Once, your virtual machine is all setup and running, the next thing is to work on creating a cross system access between your computer and the virtual machine. This means you would like to be able to access the host (windows in this case) folders from the guest (Linux in this case). To be able to do this seamlessly, you will start by installing the guest additions.

For that you will be shutting down your guest machine, first. If it is already running and then clicking on the guest additions, downloaded utility. This will pop up a licence agreement that you need to scroll down to the end and accept. And then the installation will automatically begin. Just ensure that you have the appropriate extension pack for your VirtualBox installed.

Fire up (start your virtual machine) and go to the Devices, menu on your VirtualBox. This will add a guest additions cd to your system’s virtual drive. The same one where we had mounted the installation iso before. The system might ask you to open the contents of the guest addition CD in a window, you can safely cancel it.

Now you will be working on the command line terminal for most of the time. To do this, you need to either click ctrl+alt+t or click on the terminal icon on the lower ribbon.

Type the following line of code in your terminal window to go to the recently mounted CD drive.

cd /media/user/VBox_Gas_6.1.34/        

Remember this above can vary based on the version of VirtualBox installed and the guest additions versions subsequently. The best trick if you do not know any of that is to type.

cd /m        

press TAB

and continue pressing the TAB button to autocomplete and then it will show a line like the one above in your terminal.

Press ENTER

You are now in the guest additions directory from where you can list its contents by typing the following line of code.

ls        

Now before we install out guest additions, we will need to type the following commands. You will be prompted for your password each time you use the sudo command. Please note that in a terminal there are not asterisks or symbols to highlight how many letters from the password have been typed. So, you can just type it and click enter and not wait for any prompt on the screen.?

sudo apt-get update        
sudo apt install build-essential dkms linux-headers-$(uname -r)        

This will install the necessary backend libraries that are required for proper functioning of the guest additions. Press ‘y’ if you are prompted for a yes or no.

?Next step is to make the guest additions file executable by running the following command

sudo chmod a+x VBoxLinuxAdditions.run        

and press ENTER

now type

sudo ./VBoxLinuxAdditions.run        

this will install the guest additions on your computer. You could alternatively run the autorun.sh file.

Now type

sudo reboot        

and press ENTER

While your computer reboots, you might want to go to the devices menu and select shared clipboard as bidirectional and drag and drop as bidirectional too.

Once, your system is restarted, you might want to go to the view menu and select, Adjust Window Size Host + A

This will as a first thing, scale your window to the full resolution of your screen. As you can see blow.

Next up you will be sharing your host folders with your guest machine, this can be done using the devices > shared folder option.

You can choose any folder that you would like to copy data from or to and select. Please make sure that you have the Machine Folders option selected while doing this.

Also, select/check the auto-mount and the make permanent options. And click ok. Once, done, you can again open the terminal window and type.

cd /media        

and the type

ls        

you will now see alongside the user folder the following.?

sf_nameofyoursharedfolder??

If you type

cd sf_nameofyoursharedfolder?        

and press ENTER

You will be greeted with a not very welcome window.

To fix this type the following in your terminal window

sudo usermod -aG vboxsf $(whoami)        

Now type

sudo reboot        

and your system will restart, making the new changes take effect

Once rebooted, open the terminal and type

cd sf_nameofyoursharedfolder?        

type

mkdir new_test?        

If you do not get an error message, voila

You are now good to go and your system with all GIS software need for the workshop and assignment is setup.

Can you answer the following questions?

1.???? What did the extension pack and guest additions help us achieve?

2.???? What special steps were taken to make it possible to run the guest additions installation hassle free? Was there anything we installed? What was it?

3.???? What did we do to check if our access to host directory was seamless?

?

?

?

?

要查看或添加评论,请登录

Salman Atif的更多文章

社区洞察

其他会员也浏览了