Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install Swift programming language for Ubuntu

Shulou Source: shulou.com Published: 2022-06-02 00:13:59 09月29日 Update

This article mainly introduces "how to install Swift programming language in Ubuntu". In daily operation, I believe many people have doubts about how to install Swift programming language in Ubuntu. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to install Swift programming language in Ubuntu". Next, please follow the editor to study!

Swift is Apple's new programming language specifically for OS X and iOS applications. Swift is superior to Objective-C in all respects and doesn't have so many complex symbols and expressions. At the same time, Swift is faster, more convenient, more efficient and safer. In addition, the new Swift language will still be compatible with Object-C.

Swift installation environment

System: Ubuntu 16.04

Download the Release package download the Release package on the official website of Swift.

Official address: https://swift.org/download/#releases

Take the Realse download address of 5.0.2 as an example: https://swift.org/builds/swift-5.0.2-release/ubuntu1604/swift-5.0.2-RELEASE/swift-5.0.2-RELEASE-ubuntu16.04.tar.gz

Download from the command line of Linux

Download the tool through wget

Wget https://swift.org/builds/swift-5.0.2-release/ubuntu1604/swift-5.0.2-RELEASE/swift-5.0.2-RELEASE-ubuntu16.04.tar.gz

If you continue to upload when the network is off, you can use the following command:

Wget-c https://swift.org/builds/swift-5.0.2-release/ubuntu1604/swift-5.0.2-RELEASE/swift-5.0.2-RELEASE-ubuntu16.04.tar.gz

After the download is completed, decompress:

Tar xzf swift-5.0.2-RELEASE-ubuntu16.04.tar.gz

Path after decompression:

Configure PATH environment variables

Set the swift-5.0.2-RELEASE-ubuntu16.04/usr/lib of the extracted file address to the system path

Export PATH=/ absolute path / swift-5.0.2-RELEASE-ubuntu16.04/usr/bin/: "${PATH}" verification

Verify this with the swift-- version command:

Remember to add Path to the ~ / .bash_profile file after verification.

At this point, the study on "how to install the Swift programming language in Ubuntu" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Language programming language programming learning commands addresses paths validation official files more environment systems websites help complex practical secure next download tools Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Xiaomi Shulou Tech Info Docker