(Auto)mount your favourite directories on Linux

When installing new Linux you may have your favourite mounts or in case of virtualbox shared folders. Below I explain how can you easily mount and even automount them. Below I explain how to mount using virtualbox.
Type:

$ df

The result you should see is something like this:

Filesystem                                              1K-blocks       Used Available Use% Mounted on
rootfs                                                   37130816    5164336  30080324  15% /
udev                                                        10240          0     10240   0% /dev
tmpfs                                                      207452        628    206824   1% /run
/dev/disk/by-uuid/7c4672f3-17b1-42c2-9b43-e42ed5a2b86c   37130816    5164336  30080324  15% /
tmpfs                                                        5120          0      5120   0% /run/lock
tmpfs                                                      743800        464    743336   1% /run/shm
none                                                   1855867900 1399452908 456414992  76% /media/sf_shared
/dev/sr0                                                    58094      58094         0 100% /media/cdrom0

See /media/sf_shared mount. On Virtualbox shared folder configuration this is my D:\shared folder. At my home folder I create directory shared. Now its absolute directory is /home/simon/shared, if your username is simon:). Now just type:

$ sudo mount -t vboxsf shared /home/simon/shared

And then:

$ ls -l /home/simon/shared

And you should see the list of files at your host computer. To be clear, lets do another example. For instance you create directory /home/simon/sallallaa. Then you should mount as:

$ sudo mount -t vboxsf shared /home/simon/sallallaa

If you like to automount just add your mount command to the /etc/rc.local file. Just before exit line.

  • Facebook
  • Twitter
  • Google
  • Google Plus
  • LinkedIn
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Comments are closed.