Access Your Windows and macOS Files from Linux

0
210
Access Your Windows and macOS Files from Linux

Dit bericht verscheen eerder bij FOSSlife

When you click on a new entry (either on the name or on the 2 actions for this device text), Linux will show you two options: Open with File Manager or Download Photos with Gwenview. Pick the File Manager to mount the volume and view its top level directory in Dolphin. You can also skip this decision and simply click on the triangle-and-line icon on the right of an entry which will mount the volume and do nothing (else).

Current openSUSE versions (like 15.4) also support the ExFAT filesystem out of the box which simplifies accessing such media a lot. If you run an older openSUSE release and encounter problems with ExFAT, you can install the fuse-exfat and exfat-utils packages, but on openSUSE 15.4 that is not necessary.

What about macOS?

If you happen to use an Apple Mac, macOS will by default format external media with HFS+ when you reformat them, but it will happily work with FAT- or ExFAT-formatted disks – they need no special treatment. OpenSUSE supports the HFS+ filesystem out of the box, so using HFS+-formatted media is as easy as using FAT disks.

The latest Apple filesystem is called APFS, and while macOS will not suggest you format USB sticks with APFS, you can choose to do so. OpenSUSE has no built-in APFS support, but you can install the libfsapfs package via YaST and then access your APFS disk from the shell. Note that this will give you read-only access – currently there is no driver that lets you write to APFS disks.

First you have to find out what device file you need to use. Open a terminal window and use the fdisk ‑l command to list all partitions:

$ sudo fdisk ‑l
Disk /dev/sdb: 28.7 GiB
Disk model: Cruzer Blade
...
Device     Start      End  Sectors  Size Type
/dev/sdb1     40   409639   409600  200M EFI System
/dev/sdb2 409640 60088279 59678640 28.5G unknown

In this case sdb2 is the partition we’re interested in. You can probe it with sudo fsapfsinfo /dev/sdb2 (which will reveal identifiers and volume names) and then manually mount it with

sudo fsapfsmount /dev/sdb2 /mnt

where /mnt is the mount point you want to use. Accessing the files will require root access, so open a privileged Dolphin window via the menu entry Applications | System | File Manager – Super User Mode and navigate to the right directory (press Ctrl+L and enter the path). When you’re done, unmount the disk with

sudo umount /mnt

In general, if you want to use a disk or stick with all three operating systems (Linux, Windows, and macOS), use the ExFAT filesystem. Windows, macOS and openSUSE Linux support it out of the box, and with older Linux versions it’s a simple package installation that gives you full compatibility.

Wrapping It Up

We’ve talked about Windows- and macOS-formatted media and looked at the necessary steps to access those FAT, NTFS, ExFAT, HFS+, and APFS filesystems. FAT and NTFS work out of the box, ExFAT needs a little help. If possible, it is better to avoid APFS because Linux cannot write to such a disk yet.

The box titled Permanent Mounts shows you an advanced trick that will make things easier for you if you use Windows and Linux on the same machine and intend to keep working with both operating systems.

Dit bericht verscheen eerder bij FOSSlife

Vorig artikelAlmost all ransomware attacks target backups, says Veeam
Volgend artikelMeta Open Sources AI Massively Multilingual Speech Project