Installing Swift locally

Learn how to install Swift locally to solve Exercism's exercises on your own machine


Swift is available on macOS, Linux, and Windows. The installation process varies depending on the operating system you are using. Important to note with Linux support is that Swift is only (offically) supported on the following distributions:

  • Ubuntu
  • Debian
  • RedHat
  • Fedora
  • Amazon Linux

If you are using a different distribution of Linux, you will have to find a way to install Swift yourself.

Xcode (macOS)

Swift is included with Xcode, Apple's IDE for macOS and iOS development. For the exercism track you will need to have Xcode version 16.0 or greater installed. Xcode is available for free on the Mac App Store. Additional versions of Xcode (including the most recent beta) are available at Apple's developer center.

macOS & Linux

For macOS and Linux, there is a Swift installation manager called swiftly. It is a command line tool that allows you to install and manage multiple versions of Swift on your system. The command to install swiftly on macOS can be found here, and here for linux.

Other installation methods for macOS is Homebrew. For Linux, you can install using the tarball from the official Swift website.

Windows

The recommended way to install Swift on Windows is to use the WinGet installer. It is also possible to install Swift using the Scoop package manager or doing a manual installation. For all options, see the Install Swift for Windows page.