Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Reading the Virtualbox user manual, I finally got [here], which explains how to install Virtualbox Guest Additions on a Linux guest via Command Line.

But it's not clear enough for me (I just started learning some commands). Can someone put down the exact commands you would use to install Virtualbox Guest Additions via CLI? (which includes finding where virtualbox guest additions has been mounted etc.)

share|improve this question

3 Answers 3

up vote 12 down vote accepted

... finally this worked for me, should also work for anybody else trying to install Virtualbox Guest Additions on a CentOS (x86_64) virtual server in command line mode.

# yum update
# yum install gcc
# yum install kernel-devel
# mount /dev/scd0 /media/cdrom
# sh /media/VBOXADDITIONS_4.0.12_72916/VBoxLinuxAdditions.run

When the process is complete, reboot the system. That's all.

share|improve this answer
1  
I do not think there is a need for the reboot here. Just check the vbox* modules are installed under /lib and then run modprobe for each vbox module; make sure the vbox startup scripts at /etc/init.d/vbox* are all (re)started. To just check whether the VBoxAdditions are working, I would start with testing the copy-paste between the source and vmguest. Run VBoxClient-all command and see if it returns anything. If nothing is returned VBox is setup fine. Also, check chkconfig to make sure the vbox startup scripts are properly defined to start at required runlevels. –  Nikhil Mulley Nov 30 '11 at 10:24
1  
You need to yum install make as well –  nic ferrier Feb 6 '12 at 12:23
1  
I try to do the line mount /dev/scd0 /media/cdrom and I get: mount point /media/cdrom does not exist. Is there something I am missing? –  theJerm Oct 31 '12 at 18:46
1  
Please also note that you must add your username to the groups: vboxsf, vboxusers (first create this one). –  user27119 Nov 11 '12 at 0:51
2  
@theJerm I hope you already figured this out, but for the record: create the mountpoint (just a directory) with sudo mkdir /media/cdrom. –  Anthon Jun 10 '13 at 20:27

After installing the VBOXADDITIONS you might need to do this:

In VirtualBox click View>>Auto Resize Guest Display (Host + G)

because the screen resolution did not work for me until I applied this final configuration to VirtualBox.

share|improve this answer

This is an old thread but came up in my search for a similar issue. In case anyone else runs into this, the following answer solved it for me:

http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/

Note* The URL says 2010 but the article was updated in 2013.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.