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
相关推荐
想唱rap5 分钟前
表的约束条件
linux·数据库·mysql·ubuntu·bash
山上三树16 分钟前
对比用户态线程与内核态轻量级进程
linux
2501_9481953417 分钟前
RN for OpenHarmony英雄联盟助手App实战:设置实现
linux·ubuntu
阿甘正赚.22 分钟前
Linux初学
linux·运维·服务器
物随心转24 分钟前
线程阻塞调用与同步调用的区别
linux
虚神界熊孩儿40 分钟前
Linux下修改docker和harbor默认网段的方法
linux·docker·harbor
Jay Chou why did41 分钟前
ARM寄存器
linux
洛豳枭薰42 分钟前
List梳理
数据结构·windows·list
乌日尼乐1 小时前
【Linux】iptables使用详解(RT)
linux
东木月1 小时前
使用python获取Windows产品标签
开发语言·windows·python