当前位置:首页 > 虚拟机 > 正文

虚拟机的打开文件的命令


在虚拟机中打开文件的命令可以根据所使用的虚拟化平台和操作系统而有所不同。 下面提供几种常见平台和操作系统的命令:
VMware ESXi 和 Workstation
Windows 虚拟机:
explorer.exe C:\my\path\to\file.txt
notepad.exe C:\my\path\to\file.txt
Linux 虚拟机:
nautilus /my/path/to/file.txt
gedit /my/path/to/file.txt
Hyper-V
Windows 虚拟机:
explorer.exe \?\UNC\127.0.0.1\my\path\to\file.txt
notepad.exe \?\UNC\127.0.0.1\my\path\to\file.txt
Linux 虚拟机:
gvfs-open /run/user/1000/gvfs/smb-share:server=127.0.0.1,share=my-share/my/path/to/file.txt
KVM
Windows 虚拟机:
explorer.exe \\?\UNC\127.0.0.1\my\path\to\file.txt
notepad.exe \\?\UNC\127.0.0.1\my\path\to\file.txt
Linux 虚拟机:
nautilus /my/path/to/file.txt
gedit /my/path/to/file.txt
VirtualBox
Windows 虚拟机:
explorer.exe \\VBOXSVR\my\path\to\file.txt
notepad.exe \\VBOXSVR\my\path\to\file.txt
Linux 虚拟机:
nautilus /my/path/to/file.txt
gedit /my/path/to/file.txt
注意:
上述命令中的路径应替换为要打开的文件的实际路径。
如果虚拟机无法访问文件,请确保已启用文件共享设置。
某些命令可能根据虚拟化平台和操作系统版本而有所不同。