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
相关推荐
栈低来信44 分钟前
SLUB分配器
linux
吕司1 小时前
Linux信号产生
linux·运维·服务器
A.A呐1 小时前
【Linux第九章】程序地址空间
linux
SJjiemo1 小时前
Simple Sticky Notes 轻量级桌面便签工具
windows
vortex52 小时前
Linux 终端优化:Alacritty + Zellij 配置指南
linux·kali·终端模拟器
码农编程录3 小时前
【notes11】并发/IO/内存
linux
cuijiecheng20183 小时前
Linux下MyIpAdd库的使用
linux·运维·服务器
Kelvin_Ngan4 小时前
windows环境变量超出长度限制无法添加新变量
windows
一路往蓝-Anbo4 小时前
第 12 章:Linux 侧 RPMsg 用户态驱动与数据接口
linux·运维·服务器·stm32·单片机·嵌入式硬件·网络协议
乔碧萝成都分萝5 小时前
二十六、IIO子系统 + SPI子系统 + ICM20608
linux·驱动开发·嵌入式