Install the Swift Toolchain in Swift

From the Swift cheat sheet ยท Setup ยท verified Jul 2026

Install the Swift Toolchain

Install Swift, verify the compiler, and run an executable package.

bash
# macOS
xcode-select --install
swift --version
๐Ÿ“Œ Xcode Command Line Tools includes Swift on macOS
๐Ÿ’ก Windows also needs the Visual Studio C++ and Windows SDK components
๐Ÿ” swift --version confirms the active toolchain and target
๐ŸŽฏ Swift Package Manager handles building, testing, and dependencies
installtoolchainswiftpmcli

Continue with Swift

Save the full cheat sheet or work through every related task.

Back to the full Swift cheat sheet