To run a command as root, use sudo command
. (You may want to read this to learn more.)
So: sudo mount -t vboxf ...
Creating the Mount Point for the Share
If you mount the share at /media/sharename
, that directory must first exist. To create it, run:
sudo mkdir /media/sharename
You can mount shares anywhere; they do not have to be mounted in /media
. However, these days it's common for filesystems mounted as root, especially if they may be attached and detached, to have subfolders of /media
as their mount points.
The more traditional place to put mount points is /mnt
. Either way--or elsewhere--will work.
Letting a Normal User Access and Change the Contents of the Share
If the host OS doesn't use a Unix-style filesystem--for example, if you have a Windows host running an Ubuntu guest--then you might want to specify what user you intend to give full access to the files in the share. Otherwise modifying the files (and possibly accessing them at all) will require you to act as root. You probably don't want that; you probably want to mount the share as root, but be able to access its contents as a non-rot user.
To do that, include uid=1000
in the ,
-separated list of options issued after -o
:
- If that's the only option you're specifying, no comma is required. Otherwise, all options should be separated with commas, and no spaces.
- Replace
1000
with your actual user ID. If you're the first user created on your Ubuntu system (the user created during installation), typically your user ID is 1000. To find out your user ID, run the command id -u
in the Ubuntu system.
You do not have /root
partition. You probably want to increase size of your /
partition.
You will have to boot from liveCD to resize these partitions.
It must be safe, because you have a separate /boot
partition, otherwise /etc/fstab
may need to be updated with new UUID and/or grub reinstalled.
In your case you need to shrink your /home
, which is /dev/sdb7, then move your swap partition right, then extend your /
(/dev/sdb5) right.
You can do it with a mouse. Just drag partition's sides left or right.
This may take a lot of time.
Best Answer
Press Alt+F2 and type
gksudo gparted
then it will ask for your password and then it should run as root .