$linuxjunkies
>

Migrating from macOS to Linux

Move from macOS to Linux without losing your workflow: remap ⌘ keys, restore trackpad gestures, find app alternatives, set up Time Machine-style backups, and manage dotfiles.

BeginnerUbuntuDebianFedoraArch10 min readUpdated June 7, 2026

Before you start

  • A working Linux installation with a desktop environment (GNOME or KDE recommended)
  • sudo access on the target machine
  • An external drive or cloud account for backups
  • Your existing dotfiles or shell config files copied from macOS

Switching from macOS to Linux is one of the most rewarding things you can do as a power user — and one of the most disorienting if you go in unprepared. The hardware abstraction, the keyboard shortcuts, the apps you rely on daily: almost everything has a counterpart on Linux, but rarely a drop-in replacement. This guide covers the five areas that trip up most switchers: keyboard remapping, trackpad gestures, app alternatives, backup strategy, and dotfile management.

Keyboard Remapping

macOS uses ⌘ (Command) as the primary modifier for nearly every shortcut. On Linux, that role belongs to Ctrl. Your muscle memory will fight you. The fastest fix is to remap the keys at the system level rather than retraining your fingers one app at a time.

Swap Ctrl and Super (GUI method)

On GNOME, install GNOME Tweaks and navigate to Keyboard & Mouse → Additional Layout Options → Ctrl position. Enabling "Swap Left Win with Left Ctrl" gets you closest to the macOS feel if you plug in an Apple keyboard.

# Debian/Ubuntu
sudo apt install gnome-tweaks

# Fedora
sudo dnf install gnome-tweaks

# Arch
sudo pacman -S gnome-tweaks

Swap keys system-wide with keyd (any desktop)

keyd remaps at the kernel input level — it works under Wayland, in TTYs, and in every app without per-application config. It is the modern approach.

# Install from source or AUR (Arch)
# Arch
sudo pacman -S keyd

# Other distros: build from https://github.com/rvaiya/keyd
git clone https://github.com/rvaiya/keyd
cd keyd && make && sudo make install
sudo systemctl enable --now keyd

Create /etc/keyd/default.conf to swap the left Meta (Super/Win) key into a Mac-style command key that triggers Ctrl shortcuts:

sudo tee /etc/keyd/default.conf <<'EOF'
[ids]
*

[main]
leftmeta = leftcontrol
leftcontrol = leftmeta
EOF
sudo systemctl restart keyd

After this, ⌘C/⌘V (physically the Super key) fires Ctrl+C/Ctrl+V everywhere, including Wayland compositors that block XKB remapping.

Trackpad Gestures

Linux gesture support has improved dramatically since libinput shipped in kernel 4.x. On modern hardware with a precision trackpad, two- and three-finger scrolling works out of the box. Four-finger swipes for workspace switching — the gesture macOS users rely on most — need a small extra layer.

GNOME on Wayland

GNOME 40+ ships four-finger horizontal swipes for workspace switching natively. Nothing to install. If gestures feel sluggish, tune acceleration in Settings → Mouse & Touchpad.

Other desktops: fusuma or libinput-gestures

# libinput-gestures (X11 and some Wayland sessions)
# Debian/Ubuntu
sudo apt install libinput-tools wmctrl

# Add your user to the input group, then log out and back in
sudo usermod -aG input $USER
# Install from AUR or the GitHub release
# https://github.com/bulletmark/libinput-gestures
git clone https://github.com/bulletmark/libinput-gestures
cd libinput-gestures && sudo make install
libinput-gestures-setup start autostart

Edit ~/.config/libinput-gestures.conf to bind four-finger swipes to your desktop's workspace switch commands. The project README lists examples for GNOME, KDE, and i3.

App Alternatives

Most macOS apps have a Linux equivalent. Below are the most important ones for switchers.

macOS appLinux alternativeNotes
Safari / ChromeFirefox, ChromiumBoth are first-class on Linux
Mail.appThunderbird, EvolutionEvolution integrates better with GNOME
iMessageSignal, BeeperNo native iMessage client exists on Linux
Final Cut ProDaVinci Resolve (free tier), KdenliveResolve has an official Linux build
Logic ProREAPER, ArdourREAPER runs natively via Wine or a Linux binary
XcodeVS Code, JetBrains IDEs, NeovimAll have official Linux packages
Sketch / FigmaFigma (browser), PenpotPenpot is fully FOSS and self-hostable
SpotlightGNOME Activities, KRunner, RofiRofi is distro-agnostic and highly scriptable
Alfred / RaycastAlbert, UlauncherBoth support plugins and custom workflows
1Password1Password (Linux app), Bitwarden1Password has an official .deb/.rpm

For fonts, install the noto family and ttf-liberation (metric-compatible with Arial/Times/Courier) to avoid layout regressions when opening Office documents:

# Debian/Ubuntu
sudo apt install fonts-noto fonts-liberation

# Fedora
sudo dnf install google-noto-fonts-common liberation-fonts

# Arch
sudo pacman -S noto-fonts ttf-liberation

Time Machine Equivalent: Automated Backups with Timeshift and Restic

Time Machine does two things: system snapshots and file-level versioned backups. Linux splits these into separate tools, which is actually more flexible.

System snapshots with Timeshift (btrfs or rsync)

Timeshift behaves like Time Machine for your root filesystem. If your distro uses btrfs (Fedora default, Ubuntu optional), snapshots are nearly instant. On ext4, it falls back to rsync-based snapshots.

# Debian/Ubuntu
sudo apt install timeshift

# Fedora
sudo dnf install timeshift

# Arch (AUR)
paru -S timeshift
# Create a snapshot from the CLI (btrfs mode)
sudo timeshift --create --comments "pre-upgrade snapshot" --tags D

Open the Timeshift GUI to schedule daily snapshots and set retention counts. Snapshots live on the same disk, so also keep an off-site backup.

Versioned file backup with restic

Restic handles the role Time Machine plays for your home folder: encrypted, deduplicated, incremental backups to any backend (local disk, S3, Backblaze B2, SFTP).

# Initialize a repository on an external drive
restic -r /mnt/backup/home-repo init

# Run a backup
restic -r /mnt/backup/home-repo backup ~/

# List snapshots
restic -r /mnt/backup/home-repo snapshots

Automate it with a systemd timer so you do not have to remember:

sudo tee /etc/systemd/system/restic-home.service <<'EOF'
[Unit]
Description=Restic home backup

[Service]
Type=oneshot
EnvironmentFile=/etc/restic-env
ExecStart=restic -r /mnt/backup/home-repo backup /home
EOF

sudo tee /etc/systemd/system/restic-home.timer <<'EOF'
[Unit]
Description=Run restic-home daily

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target
EOF

sudo systemctl enable --now restic-home.timer

Store your repository password and environment variables in /etc/restic-env with mode 600.

Dotfiles Workflow

macOS users often have years of shell config in ~/.zshrc, ~/.ssh/config, and application dotfiles. Bring them across cleanly and keep them in sync with a Git-based dotfiles repo — the standard approach used by most Linux developers.

Set up a bare Git repository

The bare-repo trick lets you track dotfiles in $HOME without making the whole home directory a Git repo:

git init --bare $HOME/.dotfiles
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no

# Add the alias to your shell config so it persists
echo "alias dotfiles='git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME'" >> ~/.zshrc
# Track a file
dotfiles add ~/.zshrc
dotfiles add ~/.config/nvim/init.lua
dotfiles commit -m "initial dotfiles"

# Push to a remote (GitHub, Gitea, etc.)
dotfiles remote add origin [email protected]:yourname/dotfiles.git
dotfiles push -u origin main

macOS-specific vs Linux-specific config

Your existing .zshrc may reference brew, open, or pbcopy. Guard those blocks with a platform check so the same file works on both systems during a transition period:

if [[ "$(uname)" == "Darwin" ]]; then
  eval "$(/opt/homebrew/bin/brew shellenv)"
else
  # Linux equivalents
  alias open='xdg-open'
  alias pbcopy='xclip -selection clipboard'
  alias pbpaste='xclip -selection clipboard -o'
fi

Verification

After completing the steps above, run through this quick checklist:

  • Open a terminal and press Super+C (physical ⌘+C on Apple keyboard) — it should copy, not open a menu.
  • Run libinput list-devices and confirm your trackpad is listed as a "pointer" and "gesture" device.
  • Create a Timeshift snapshot and verify it appears in the snapshot list.
  • Run restic -r /mnt/backup/home-repo check to verify backup integrity.
  • Run dotfiles status and confirm your tracked files appear clean.

Troubleshooting

keyd not remapping under Wayland

Make sure the keyd systemd service is enabled, not just started. Run sudo systemctl status keyd and look for active (running). If the service starts after your login session, the remap will not apply at the lock screen. Enable it with sudo systemctl enable keyd so it starts at boot.

Gestures work on X11 but not Wayland

libinput-gestures uses XTest to inject key events, which is blocked on most Wayland compositors. Switch to a Wayland-native tool: fusuma with the fusuma-plugin-sendkey plugin, or use a desktop that handles gestures natively (GNOME 40+, KDE Plasma 5.25+).

Restic backup fails silently

Check the systemd journal: journalctl -u restic-home.service -n 50. The most common causes are a missing or incorrect password in the environment file, or the external drive not being mounted when the timer fires. Add a RequiresMountsFor= directive to the service unit if you back up to a specific mount point.

tested on:Ubuntu 24.04Fedora 40Arch 2024.05.01Debian 12

Frequently asked questions

Can I run macOS apps on Linux?
Not reliably. Darling is an experimental macOS compatibility layer but it is nowhere near Wine's maturity for Windows apps. Your best path is finding a native Linux alternative rather than trying to run .app bundles.
Will my Apple Magic Trackpad work on Linux?
The Magic Trackpad 2 and 3 work over Bluetooth and USB. The hid-magicmouse kernel driver handles them. Multi-finger gestures are recognized by libinput, though you may need the libinput-gestures or fusuma layer for custom four-finger bindings.
Should I choose GNOME or KDE Plasma as a macOS replacement?
GNOME's workflow — single application focus, gesture-driven workspace switching, Activities overview — is closest to macOS. KDE Plasma is more configurable and closer to Windows in its taskbar metaphor. Try both via live ISO before installing.
Is there a way to keep my iCloud files accessible on Linux?
There is no official iCloud Drive client for Linux. You can access iCloud via the browser at icloud.com for documents and photos. For ongoing syncing, migrating to Nextcloud, Syncthing, or a Dropbox/ProtonDrive account that has a Linux client is a better long-term solution.
Do I need to keep a macOS install around as a fallback?
If you own Apple hardware, keeping a small macOS partition is sensible for the first month. Once you confirm your workflow is covered and firmware updates are applying correctly via fwupd, you can reclaim that space.

Related guides