How to install and run Swift on Linux

A step by step guide on how to install Swift on Ubuntu 20.04.


Download Swift from -> select the Toolchain archive for Ubuntu 20.04

Extract the archive, then open ~/.bashrc and append this line:

Reload .bashrc with source ~/.bashrc

Install the required dependencies. See -> Linux -> Installation -> Install required dependencies (for Ubuntu 20.04)

Test it, in a terminal:

Create an example app

Make a folder:

Then generate an empty project with:

and run the executable:

Originally published at