---
title: Install Swift - Linux
framework: swift-org
role: article
path: swift-org/install/linux
---

# Install Swift - Linux

Install Swift

[Linux](/docs/swift-org/install/linux/)

[macOS](/docs/swift-org/install/macos/)

[Windows](/docs/swift-org/install/windows/)

### 1. Install Swift via Swiftly

The Swiftly installer manages Swift and its dependencies. It supports switching between different versions and downloading updates.

```
curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz && \
tar zxf swiftly-$(uname -m).tar.gz && \
./swiftly init --quiet-shell-followup && \
. "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" && \
hash -r
```

```
curl -O https://download.swift.org/swiftly/linux/swiftly-(uname -m).tar.gz && \
tar zxf swiftly-(uname -m).tar.gz && \
./swiftly init --quiet-shell-followup && \
set -q SWIFTLY_HOME_DIR && \
source "$SWIFTLY_HOME_DIR/env.fish" || source ~/.local/share/swiftly/env.fish
```

[License: Apache-2.0](https://raw.githubusercontent.com/swiftlang/swiftly/refs/heads/main/LICENSE.txt)

[PGP: Signature](https://download.swift.org/swiftly/linux/swiftly-x86_64.tar.gz.sig)

[Instructions](https://www.swift.org/install/linux/swiftly)

## Container

Official container images are available for compiling and running Swift on a variety of distributions.

[Docker Hub](https://hub.docker.com/_/swift)

[Instructions](https://www.swift.org/install/linux/docker)

### 2. Select an Editor

## Visual Studio Code

Visual Studio Code is a cross-platform and extensible editor that supports Swift through the Swift extension, which provides intelligent editor functionality as well as debugging and test support.

[Install Swift extension](https://marketplace.visualstudio.com/items?itemName=swiftlang.swift-vscode)

[Documentation](https://code.visualstudio.com/docs/languages/swift)

## Other editors

Any editor that supports the Language Server Protocol (LSP) can use SourceKit-LSP to provide intelligent editor functionality for Swift.

[Learn more](https://www.swift.org/tools/#editors)

### 3. Build a Command-line Tool

Let’s write a small application with your new Swift development environment.

Create a directory:

```
mkdir MyCLI
```

Change the directory:

```
cd MyCLI
```

Create a new project:

```
swift package init --name MyCLI --type executable
```

Run the program with

```
swift run MyCLI
```

You can continue to expand the program with additional features. Check out the getting started guide for command line tools.

[Build a Command-line Tool Guide](/docs/swift-org/getting-started/cli-swiftpm/)

## Swift SDK Bundles

Additional components for cross-compilation

## Swift SDK for Static Linux

Copy install command

[Download SDK](https://download.swift.org/swift-6.3.2-release/static-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_static-linux-0.1.0.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/swift-6.3.2-release/static-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_static-linux-0.1.0.artifactbundle.tar.gz.sig)

[Instructions](/docs/swift-org/documentation/articles/static-linux-getting-started.html/)

## Swift SDK for WebAssembly

Copy install command

[Download SDK](https://download.swift.org/swift-6.3.2-release/wasm-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_wasm.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/swift-6.3.2-release/wasm-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_wasm.artifactbundle.tar.gz.sig)

[Instructions](/docs/swift-org/documentation/articles/wasm-getting-started.html/)

## Swift SDK for Android

Copy install command

[Download SDK](https://download.swift.org/swift-6.3.2-release/android-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_android.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/swift-6.3.2-release/android-sdk/swift-6.3.2-RELEASE/swift-6.3.2-RELEASE_android.artifactbundle.tar.gz.sig)

[Instructions](/docs/swift-org/documentation/articles/swift-sdk-for-android-getting-started.html/)

## Development Snapshots

Swift snapshots are prebuilt binaries that are automatically created from the branch. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.

## Swiftly

Swiftly supports installing development snapshot toolchains. For example, you can install the latest available snapshot for the next major release using the “main-snapshot” selector and prepare your code for when it arrives.

``` swiftly install main-snapshot ```

``` swiftly install 6.4.x-snapshot ```

[Instructions](https://swift.org/install/linux/swiftly)

## Swift SDK Bundles

Additional components for cross-compilation

### Static Linux SDK

[Instructions](/docs/swift-org/documentation/articles/static-linux-getting-started.html/)

## main

May 27, 2026

Copy install command

[Download](https://download.swift.org/development/static-sdk/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a_static-linux-0.1.0.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/development/static-sdk/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a_static-linux-0.1.0.artifactbundle.tar.gz.sig)

## release/6.4.x

May 31, 2026

Copy install command

[Download](https://download.swift.org/swift-6.4.x-branch/static-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-05-31-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-05-31-a_static-linux-0.1.0.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/swift-6.4.x-branch/static-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-05-31-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-05-31-a_static-linux-0.1.0.artifactbundle.tar.gz.sig)

### Swift SDK for WebAssembly

[Instructions](/docs/swift-org/documentation/articles/wasm-getting-started.html/)

## main

May 27, 2026

Copy install command

[Download](https://download.swift.org/development/wasm-sdk/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a_wasm.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/development/wasm-sdk/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a_wasm.artifactbundle.tar.gz.sig)

## release/6.4.x

June 8, 2026

Copy install command

[Download](https://download.swift.org/swift-6.4.x-branch/wasm-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a_wasm.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/swift-6.4.x-branch/wasm-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a_wasm.artifactbundle.tar.gz.sig)

### Swift SDK for Android

[Instructions](/docs/swift-org/documentation/articles/swift-sdk-for-android-getting-started.html/)

## main

May 27, 2026

Copy install command

[Download](https://download.swift.org/development/android-sdk/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a_android.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/development/android-sdk/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a_android.artifactbundle.tar.gz.sig)

## release/6.4.x

June 8, 2026

Copy install command

[Download](https://download.swift.org/swift-6.4.x-branch/android-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a_android.artifactbundle.tar.gz) | [Signature (PGP)](https://download.swift.org/swift-6.4.x-branch/android-sdk/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a/swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-08-a_android.artifactbundle.tar.gz.sig)

[Alternate Install Options](https://swift.org/install/linux/amazonlinux/2)
