windows or ubuntu mount 文件

windows

实测环境:windows 11, 64 bit.

ref:

Mount-DiskImage (Storage) | Microsoft Learn

Dismount-DiskImage (Storage) | Microsoft Learn

Get-DiskImage (Storage) | Microsoft Learn

bash 复制代码
# 查询
Get-DiskImage -ImagePath "f:\wsl\ext4.vhdx"

# mount
Mount-DiskImage -ImagePath "E:\ISO-Files\My US Visit Fall 2010 Pictures.iso"
Mount-DiskImage -ImagePath "f:\wsl\ext4.vhdx"

# unmount
Dismount-DiskImage -ImagePath "f:\wsl\ext4.vhdx"

ubuntu

对应版本:

bash 复制代码
# http://libguestfs.org/guestmount.1.html
sudo apt-get install libguestfs-tools

# 查询
mount

# mount
sudo guestmount --add ext4.vhdx --inspector --ro /mnt/mymount

--add
Add a block device or virtual machine image.

--inspector
Using virt-inspector(1) code, inspect the disks looking for an operating system and mount filesystems as they would be mounted on the real virtual machine.

--ro
Add devices and mount everything read-only. Also disallow writes and make the disk appear read-only to FUSE.

# unmount
sudo umount /mnt/mymount
相关推荐
bugtraq202111 分钟前
XiaoMi Mi5(gemini) 刷入Ubuntu Touch 16.04——安卓手机刷入Linux
linux·运维·ubuntu
菜鸟单飞12 分钟前
介绍一款非常实用的PDF阅读软件!
windows·pdf·电脑
CodeWithMe1 小时前
[ Vim ] 常用命令 and 配置
linux·编辑器·vim
DC_BLOG1 小时前
Linux-GlusterFS进阶分布式卷
linux·运维·服务器·分布式
cookies_s_s2 小时前
Linux--进程(进程虚拟地址空间、页表、进程控制、实现简易shell)
linux·运维·服务器·数据结构·c++·算法·哈希算法
丁劲犇2 小时前
碳基生物的悲歌-DeepSeek思考实现Linux动态库递归收集工具
linux·递归·deepseek·ldd
zhouwu_linux2 小时前
MT7628基于原厂的SDK包, 修改ra1网卡的MAC方法。
linux·运维·macos
2401_897930062 小时前
linux系统如何配置host.docker.internal
linux·docker·eureka
诶尔法Alpha3 小时前
Linux上使用dify构建RAG
linux·运维·服务器
熬夜苦读学习3 小时前
Linux文件系统
linux·运维·服务器·开发语言·后端