Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Linux

เปิดไฟล์ DMG บน Ubuntu และแปลงเป็น ISO: คู่มือขั้นตอน

แปลง DMG เป็น ISO (ผ่าน IMG)

DMG = Disk Image ของ macOS Linux ไม่ Mount DMG โดยตรง ต้องแปลงเป็น ISO ก่อน

ขั้นตอนที่ 1: ติดตั้ง dmg2img

sudo apt install dmg2img

ขั้นตอนที่ 2: แปลง DMG → IMG

dmg2img /path/to/file.dmg

ได้ไฟล์ file.img

ขั้นตอนที่ 3: Mount IMG (HFS+ Filesystem)


sudo mkdir /mnt/mount_point
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop /path/to/file.img /mnt/mount_point

ขั้นตอนที่ 4: แปลง IMG → ISO ด้วย Brasero

sudo apt install brasero
  1. เปิด Brasero → Data Project
  2. กด + → เลือกโฟลเดอร์ Mount Point (/mnt/mount_point)
  3. Burn → เลือกตำแหน่ง/ชื่อ Output ISO → Create Image

Mount ISO บน Ubuntu


sudo mkdir /mnt/iso_mount
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop /path/to/file.iso /mnt/iso_mount
# ใช้งานไฟล์ใน /mnt/iso_mount
sudo umount /mnt/iso_mount  # ยกเลิก Mount

ดูเนื้อหา DMG โดยตรงด้วย p7zip (ไม่ต้อง Mount)

sudo apt install p7zip
7z x file.dmg

Extract ไฟล์ทั้งหมดออกมา Browse ได้เลย เหมาะสำหรับ DMG ที่เป็น Archive/Compressed

รันโปรแกรม macOS (.dmg) บน Ubuntu ได้ไหม?

โดยตรง: ไม่ได้ เพราะ File System, Libraries, System Calls ต่างกัน

ทางเลือก: ใช้ Darling (Wine สำหรับ macOS) Compatibility Layer ยังพัฒนาอยู่ ไม่เสถียรเต็มที่

สรุป

  • DMG → IMG (dmg2img) → Mount HFS+ → ISO (Brasero) → Mount ISO
  • หรือ Extract ด้วย p7zip/7z ถ้าแค่อ่านไฟล์
  • รัน App macOS ต้องใช้ Darling (Third-party)