Starting up Swift Programming in Ubuntu 14.04

In this article, we will see how to start up Apple’s Swift programming in Ubuntu 14.04 ( code named Trusty).

1. Install the library ‘clang’

In Ubuntu, open a terminal and enter the command given below :

$ sudo apt-get install clang

2. Download the latest version of Swift for Ubuntu 14.04 from the given below link :

3. Extract the downloaded file ( swift-2.2-SNAPSHOT-2015-12-10-a-ubuntu14.04.tar.gz ) to /usr/local

$cp swift-2.2-SNAPSHOT-2015-12-10-a-ubuntu14.04.tar.gz /usr/local
$cd /usr/local
$sudo tar -xvzf swift-2.2-SNAPSHOT-2015-12-10-a-ubuntu14.04.tar.gz

4. Add the bin directory to the PATH environment variable

Open the file /etc/profile in vim

$vim /usr/local/swift-2.2-SNAPSHOT-2015-12-10-a-ubuntu14.04/usr/bin

Add the bin directory to the PATH


Re-open the terminal

5. Execute the command swift in a terminal


Now an interactive shell called Read-Eval-Print-Loop ( REPL ) is opened to work with Swift programming language in Ubuntu Linux

6. Reference

Comments on this post

No comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

Trackbacks and Pinbacks on this post

No trackbacks.

TrackBack URL