Skip to content
AgileLogics
4 min read

Installing Swift

This course targets Swift 6. Any newer Swift 6.x release works too. Official installation instructions for every platform are at swift.org/install.

macOS

Install Xcode from the Mac App Store. It includes the Swift compiler, the iOS simulators, and everything needed to build Apple apps. Open Xcode once after installing, so it can finish setting up its components.

Linux

Use swiftly, the official Swift toolchain installer, following the instructions on swift.org/install. It installs the latest release and lets you switch between Swift versions.

Windows

Follow the Windows instructions on swift.org/install. The Windows toolchain also requires Visual Studio's C++ build tools and the Windows SDK, which the instructions walk you through.

Check the installation

Open a new terminal and run:

swift --version

You should see a line containing Swift version 6. followed by the exact release and your platform — for example, on a Mac:

swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0

The numbers will match whatever you installed. If the terminal says swift: command not found (or "is not recognized" on Windows), close and reopen it; if it still fails, the toolchain isn't on your PATH.

No installation at all? The Swift Playgrounds app (free on iPad and Mac) and online playgrounds such as the one at swiftfiddle.com run small programs without setup.