git clone https://github.com/roymejia2217/sf-linux-installer.git
cd sf-linux-installer
./install.sh- 147 fonts across 4 families: SF Pro (47), SF Compact (38), New York (50), SF Mono (12)
- User and system-wide installation modes
- Automatic font family discovery from the
fonts/directory with no hardcoded lists - Idempotent execution. Re-running the script skips already-installed files
- Desktop environment detection and font configuration for GNOME, Cinnamon, XFCE, MATE, and KDE Plasma
- Preserves the user current system font size when applying desktop settings
- Uninstall mode removes fonts and fontconfig entries cleanly
- Dry-run mode previews all changes without modifying the system
- Automatic privilege escalation via sudo, doas, or su for system installation
- No external dependencies beyond coreutils, fontconfig, and the desktop environment own tools
- No network access required. All fonts ship locally in the repository
| Requirement | Purpose |
|---|---|
| Bash 4.0+ | Script runtime |
fontconfig (fc-cache) |
Font cache management |
| sudo, doas, or su | System-wide installation (--system) |
| xfconf-query | XFCE font configuration |
| gsettings | GNOME, Cinnamon, MATE font configuration |
| killall or pkill | Desktop environment refresh |
All listed tools are pre-installed on standard Linux desktop distributions. The script detects which tools are available and adapts accordingly.
Installs fonts to ~/.local/share/fonts/apple and writes fontconfig to ~/.config/fontconfig/fonts.conf. Does not require elevated privileges.
./install.shInstalls fonts to /usr/local/share/fonts/apple and writes fontconfig to /etc/fonts/conf.d/99-apple-fonts.conf. Requires root access.
./install.sh --systemUsage: ./install.sh [OPTIONS]
Install Apple fonts (SF Pro, SF Mono, SF Compact, NY) on Linux.
Options:
--system Install system-wide (/usr/local/share/fonts/apple)
--uninstall Remove installed fonts and fontconfig
--dry-run Show what would be done without making changes
-h, --help Show this help message and exit
Examples:
./install.sh # Install for current user
./install.sh --system # Install for all users (requires root)
./install.sh --dry-run # Preview changes
./install.sh --uninstall # Remove fonts
./install.sh --uninstallRemoves the font directory and fontconfig entries, then refreshes the font cache.
./install.sh --dry-runDisplays the number of fonts that would be installed and the target paths without copying any files.
sf-linux-installer/
├── install.sh
└── fonts/
├── NY/Library/Fonts/ (50 fonts - .otf, .ttf)
├── SF-Compact/Library/Fonts/ (38 fonts - .otf, .ttf)
├── SF-Mono/Library/Fonts/ (12 fonts - .otf)
└── SF-Pro/Library/Fonts/ (47 fonts - .otf, .ttf)
| Path | Description |
|---|---|
install.sh |
Main installer script |
fonts/<family>/Library/Fonts/ |
Source font files for each family |
The script auto-discovers font families by scanning top-level directories under fonts/. Adding a new family requires only placing a directory with .ttf or .otf files under fonts/.
| Screenshot | Description |
|---|---|
| install.webp | Installation process output — font families discovered, files copied, fontconfig written, and font cache refreshed. |
| result.webp | Post-installation result — all 4 font families (SF Pro, SF Compact, SF Mono, New York) available in the system font picker. |
MIT License. See LICENSE for details.
Apple, SF Pro, SF Mono, SF Compact, and New York are trademarks of Apple Inc. This project distributes fonts for personal use only and is not affiliated with or endorsed by Apple Inc.


