Vmware shared folder kali linux

Vmware shared folder kali linux

You are using an outdated browser. Please upgrade your browser to improve your experience.

After you enable a shared folder, you can mount one or more directories or subdirectories in the shared folder to any location in the file system in addition to the default location of /mnt/hgfs .

Depending on the kernel version of the Linux guest operating system, VMware Tools uses different components to provide shared-folder functionality. In Linux kernels prior to version 4.0, the VMware Tools services script loads a driver that performs the mount. Linux kernels 4.0 and later use a FUSE file system component.

You can use different mount commands to mount all shares, one share, or a subdirectory within a share to any location in the file system. The commands also vary depending on the Linux-kernel version of the guest.

Table 1. Mount Command Syntax

Linux Kernel Prior to 4.0 Linux Kernel 4.0 and Later Description
mount -t vmhgfs .host:/ /home/user1/shares /usr/bin/vmhgfs-fuse .host:/ /home/user1/shares -o subtype=vmhgfs-fuse,allow_other Mounts all shares to /home/user1/shares
mount -t vmhgfs .host:/foo /tmp/foo /usr/bin/vmhgfs-fuse .host:/foo /tmp/foo -o subtype=vmhgfs-fuse,allow_other Mounts the share named foo to /tmp/foo
mount -t vmhgfs .host:/foo/bar /var/lib/bar /usr/bin/vmhgfs-fuse .host:/foo/bar /var/lib/bar -o subtype=vmhgfs-fuse,allow_other Mounts the subdirectory bar within the share foo to /var/lib/bar

For Linux kernel prior to version 4.0, you can use VMware-specific options in addition to the standard mount syntax. Enter the command /sbin/mount.vmhgfs -h to list the options.

For Linux kernel version 4.0 or later, enter the command /usr/bin/vmhgfs-fuse -h to list the available options.

Note: The mount can fail if shared folders are not enabled or if the share does not exist. You are not prompted to run the VMware Tools vmware-config-tools.pl configuration program again.

Источник

Where to find the shared folder in Kali Linux?

I use Kali Linux as a virtual machine in VMware Workstation Player with Windows 10 Home as host. The Player has the option to pick a Windows folder to be used as a shared folder. I set this up, it says it’s enabled, but in Kali Linux this shared folder should be present in /mnt/hgfs . /mnt exists, but is empty. I’m stuck here.

Читайте также:  Узнать свою группу linux

You need to learn that on Unix/BSD/Linux, they are «directories» and not the Windows-ism of «folders» which is not the same thing.

4 Answers 4

Both stackprotector’s AND petoetje59’s answer helped with this issue.

  1. cd /mnt/hgfs
  2. If the folder is missing —> sudo mkdir hgfs
  3. sudo vim /etc/fstab
  4. Enter vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0 at the end of the file and save
  5. sudo reboot now
  6. ls /mnt/hgfs
  7. The Shared Folder you enabled in VMware Fusion Settings will appear

The short of it is below, but here’s a little ten minute video that goes through a good step by step process.

Even if the hgfs folder was present, it would be empty. The host has made the files available to the vm, but the vm still needs to be told about their presence. The same thing happens occasionally when you plug in a thumb drive. To do this, from the Kali command line you use the mount command. After you’re done working with the shared folder I would use umount, so that I wouldn’t have a persistent connection across my operating systems. Keep us updated on your fix.

Executed the instructions mentioned in that video, and as expected, that guy on Youtube left out half the story to make it really work — even by reading up on the comments. Sigh. I finally assembled everything I found into my answer, and tested it successfully.

I have a working VMware Workstation Player (VMWP) with Windows 10 Home as the host and Kali Linux 2020.2 as guest OS. The required VMware Tools for Linux have been installed (I use a premade VM image which had them already embedded).

To REALLY setup a shared folder for both OS:

  1. Create the shared folder on the host, e.g.: E:\VM_SHARE
  2. Start the guest.
  3. From the VMWP :
Player Manage Virtual Machine Settings. Options tab Shared Folders Always enabled Add. Next Browse. Host path : E:\VM_SHARE Name : VM_SHARE Next Enable this share Finish OK 
  1. According to this the shared folder on the guest is supposed to appear in /mnt/hgfs but the last folder was missing on my system. Open a terminal window in the guest, and create the missing folder:
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other 

Important, the first line in this file has to be: #!/bin/sh -e

In my case this line started with the wrong attributes: -rw-r—r—

 sudo chown root /etc/rc.local sudo chmod 755 /etc/rc.local 

The right attributes should now be: -rwxr-xr-x

  1. Put some test file test.txt in E:\VM_SHARE on the host.
  2. Restart the VM, and check whether the test file also appears on the guest — using the graphical File System on the guest’s desktop:
Читайте также:  Услуга по установке linux

If I missed something that might also spoil things, feel free to add to this answer.

Источник

Общая папка VMware в Linux

Общая папка для виртуальной машины и основной системы очень часто необходима для обмена файлами между хостовой и гостевой операционной системой. В одной из прошлых статей мы говорили о том как настроить общую папку VirtualBox. Но VMware — это тоже очень популярная виртуальная машина.

Поэтому в сегодняшней статье мы рассмотрим как сделать общую папку VMware Player в вашей системе. Я буду подразумевать, что обе операционные системы, хост и гость — это какой-либо дистрибутив Linux. В данном случае это Ubuntu.

Настройка общей папки VMware в Linux

Начать надо с настройки самой виртуальной машины. Запустите VMware и откройте контекстное меню для нужной машины. В нём выберите Virtual Machine Settings:

В открывшемся окне перейдите на вкладку Options:

На этой вкладке откройте пункт Shared Folders, а значение переключателя Folder Sharing установите в положение Always enabled:

Затем надо добавить общую папку. Для этого кликните по кнопке Add. , в открывшемся окне введите название общей папки, а затем введите или выберите путь к нужной папке в основной системе. Затем нажмите кнопку OK и Save внизу окна чтобы всё сохранить.

После этого можно запускать виртуальную машину. В самой виртуальной машине общая папка должна монтироваться в /mnt/hgfs. Если такой папки нет проверьте установлены ли пакеты open-vm-tools и open-vm-tools-desktop:

sudo apt install open-vm-tools open-vm-tools-desktop

Затем с помощью такой команды, вы можете проверить видна ли ваша общая папка в гостевой системе:

Затем можно смонтировать попытаться смонтировать все общие папки в /mnt. Для этого сначала создайте папку /mnt/hgfs, если она не существует:

Затем осталось выполнить монтирование с помощью утилиты vmhgfs-fuse:

sudo vmhgfs-fuse .host: /mnt/hgfs -o allow_other -o uid=1000

Кроме, непосредственно, пути к точке монтирования надо передать опцию allow_other чтобы все пользователи могли получить доступ к папке, а владельцем папки сделать пользователя с идентификатором 1000, обычно это идентификатор первого зарегистрированного в системе пользователя, если у вас другой идентификатор замените на свой. Это позволит этому пользователю записывать файлы в эту папку.

Читайте также:  Aida64 alternatives for linux

Теперь можно посмотреть её содержимое:

Теперь, чтобы эта папка монтировалась всегда при запуске системы надо добавить такую строчку в /etc/fstab:

.host: /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other,uid=1000,nonempty 0 0

Или если вы хотите монтировать только определённую общую папку, например, Data, то надо указать её имя после адреса .host:

.host:/Data /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other,uid=1000,nonempty 0 0

Вот и всё. Теперь вы знаете как настраивается общая папка VMware в Linux, а также как смонтировать её, если автоматическое монтирование не работает. Как видите, всё довольно просто.

Обнаружили ошибку в тексте? Сообщите мне об этом. Выделите текст с ошибкой и нажмите Ctrl+Enter.

Источник

Vmware shared folder kali linux

You are using an outdated browser. Please upgrade your browser to improve your experience.

After you enable a shared folder, you can mount one or more directories or subdirectories in the shared folder to any location in the file system in addition to the default location of /mnt/hgfs .

Depending on the kernel version of the Linux guest operating system, VMware Tools uses different components to provide shared-folder functionality. In Linux kernels prior to version 4.0, the VMware Tools services script loads a driver that performs the mount. Linux kernels 4.0 and later use a FUSE file system component.

You can use different mount commands to mount all shares, one share, or a subdirectory within a share to any location in the file system. The commands also vary depending on the Linux-kernel version of the guest.

Table 1. Mount Command Syntax

Linux Kernel Prior to 4.0 Linux Kernel 4.0 and Later Description
mount -t vmhgfs .host:/ /home/user1/shares /usr/bin/vmhgfs-fuse .host:/ /home/user1/shares -o subtype=vmhgfs-fuse,allow_other Mounts all shares to /home/user1/shares
mount -t vmhgfs .host:/foo /tmp/foo /usr/bin/vmhgfs-fuse .host:/foo /tmp/foo -o subtype=vmhgfs-fuse,allow_other Mounts the share named foo to /tmp/foo
mount -t vmhgfs .host:/foo/bar /var/lib/bar /usr/bin/vmhgfs-fuse .host:/foo/bar /var/lib/bar -o subtype=vmhgfs-fuse,allow_other Mounts the subdirectory bar within the share foo to /var/lib/bar

For Linux kernel prior to version 4.0, you can use VMware-specific options in addition to the standard mount syntax. Enter the command /sbin/mount.vmhgfs -h to list the options.

For Linux kernel version 4.0 or later, enter the command /usr/bin/vmhgfs-fuse -h to list the available options.

Note: The mount can fail if shared folders are disabled or if the share does not exist. You are not prompted to run the VMware Tools vmware-config-tools.pl configuration program again.

Источник

Оцените статью
Adblock
detector