Page 1 of 1

Edit rc.local file on Linux guest?

Posted: 16. Aug 2013, 05:48
by Poci
Hi, Im running Linux Mint 14.1 as a guest on Win 8.

I have a shared folder between both of them but I have to input mount command everytime I run the VM.

I was told there is a way to make the share folder mount permanent by editing rc.local file in Linux.

How do I do this?

Re: Edit rc.local file on Linux guest?

Posted: 16. Aug 2013, 06:58
by stefan.becker
Its all written, you only have to read it.

Look into the manual. There is the automount of shared folders described.

Re: Edit rc.local file on Linux guest?

Posted: 16. Aug 2013, 14:27
by Perryg
You add the mount statement to the (guests) /etc/rc.local file by editing it as sudo.

be sure to add the statement before the "exit 0" line in the file.

Example:

Code: Select all

# By default this script does nothing.

mount -t vboxsf -o rw,uid=1000,gid=1000 shared /mnt/shared

exit 0

Re: Edit rc.local file on Linux guest?

Posted: 21. Aug 2013, 08:11
by Poci
Yes but what program do I use to edit the rc.local file.

Sorry for being a pain in the butt but im a total Linux n00b.

Re: Edit rc.local file on Linux guest?

Posted: 25. Aug 2013, 06:52
by stefan.becker
vi, gedit, ... Whatever is installed.

I think you are missing linux know how. But that is not the topic of this forum.

Re: Edit rc.local file on Linux guest?

Posted: 29. Aug 2013, 19:58
by Poci
Of course Im missing Linux know how, im a n00b with Linux, been using Winblows my whole life since 98 lol.

Ok the Linux Im using as guest is Mint 15 MATE.

Which program does it have that I should use for editing the rc.local file?

Re: Edit rc.local file on Linux guest?

Posted: 29. Aug 2013, 20:21
by Poci
Ok I managed to get vi installed and opened the rc.local file and input the command parameters but when I try and save it says its read only use ! to override. Now what?

Re: Edit rc.local file on Linux guest?

Posted: 29. Aug 2013, 20:24
by Perryg
@Poci,
How to use Linux is not in the scope of this forum. You should ask the mint forums on how to do these kind of things.

Hint: you need to use sudo to open the file in vi. It requires elevated permission to edit is.

Re: Edit rc.local file on Linux guest?

Posted: 31. Aug 2013, 12:27
by Poci
Perryg wrote:@Poci,
How to use Linux is not in the scope of this forum. You should ask the mint forums on how to do these kind of things.

Hint: you need to use sudo to open the file in vi. It requires elevated permission to edit is.
So how do I do that?

I open terminal in rc.local folder and then what?

Sorry but Id rather ask here, I don't want to go have to register at Linux mint forums. Please help me.

Re: Edit rc.local file on Linux guest?

Posted: 31. Aug 2013, 14:57
by Perryg

Code: Select all

sudo vi /etc/rc.local
But you had better go ahead and register with your distro forums.