Answer the question
In order to leave comments, you need to log in
How to make a permanently mounted folder in Ubuntu in a virtual machine?
Host machine Win8.1
VirtualBox v5.0.14
Guest Ubuntu15.10
Folder command sudo mount -t vboxsf VirtualBoxShare /media/share
mounted without problems.
team
sudo echo VirtualBoxShare /media/share vboxsf defaults 0 0 >> /etc/fstab
I want to make it so that it is constantly watched, but ubunta gives an error bash: /etc/fstab: Permission denied
Answer the question
In order to leave comments, you need to log in
For sudo echo, you can already beat your hands with a steel ruler;)
Do not use sudo and redirections (">" and ">>") in one command if you want everything to work on behalf of the same user (root). Because sudo works for the command, but not for the redirect.
Several exits:
and all commands (including redirect) will be root until you exit (exit or Ctrl+d)
launches an interpreter as root, to which the command is specified with redirection as an argument
tee runs as root and redirects to the specified file (it is intended for this), do not forget --append or -a so as not to overwrite, but append to the file.
PS line for /etc/fstab is better to take from /etc/mtab :)
Open the file and insert the line manually.sudo gedit /etc/fstab
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question