25

I noticed Xcode has released a (non-snapshot) xCode download for Ubuntu.

I looked for an article on how to install it and I couldnt find anything.

Can anyone advise how to do this?

JBraha
  • 113

1 Answers1

20

To install Swift on Ubuntu, you are going to have install a component called clang:

Go to the terminal and type:

sudo apt-get install clang

If you installed the Swift toolchain on Linux to a directory other than the system root, you will need to run the following command, using the actual path of your Swift installation:

export PATH=/path/to/Swift/usr/bin:"${PATH}"

You can verify that you are running the expected version of Swift by entering the swift command and passing the --version flag:

swift --version
 Apple Swift version 2.2-dev (LLVM ..., Clang ..., Swift ...)

The -dev suffix on the version number is used to indicate that it’s a development build, not a released version.