{"id":12284,"date":"2024-09-08T06:29:20","date_gmt":"2024-09-08T06:29:20","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=12284"},"modified":"2024-09-26T11:08:28","modified_gmt":"2024-09-26T11:08:28","slug":"how-to-install-swift-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/","title":{"rendered":"How to Install Swift on Ubuntu 24.04"},"content":{"rendered":"\n<p><a id=\"post-12284-_heading=h.1fob9te\"><\/a><a href=\"https:\/\/www.swift.org\/\">Swift<\/a> is a modern programming language available for free. It can be configured on operating systems like Windows, Linux system (Ubuntu), and more.<\/p>\n\n\n\n<p>Currently, it is becoming one of the fastest programming languages due to its performance, speed, and simple syntax. Swift&#8217;s frameworks can be utilized for building complex web development projects.<\/p>\n\n\n\n<p>This article provides simple steps for installing Swift on the <a href=\"https:\/\/ubuntu.com\/blog\/tag\/ubuntu-24-04-lts\">Ubuntu 24.04<\/a> system.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.1t3h5sf\"><\/a><strong>How to Install Swift on Ubuntu 24.04?<\/strong><\/h1>\n\n\n\n<p>You can install Swift with the following main steps:<\/p>\n\n\n\n<p><a href=\"#How-to-Download-the-Latest-\u201cSwift\u201d-on-Ubuntu-24.04\">How to Download the Latest \u201cSwift\u201d on Ubuntu 24.04?<\/a><\/p>\n\n\n\n<p><a href=\"#How-to-Configure-\u201cSwift\u201d-on-Ubuntu-24.04\">How to Configure \u201cSwift\u201d on Ubuntu 24.04?<\/a><\/p>\n\n\n\n<p><a href=\"#How-to-Launch-and-Test-\u201cSwift\u201d-on-Ubuntu-24.04\">How to Launch and Test \u201cSwift\u201d on Ubuntu 24.04?<\/a><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.4d34og8\"><\/a>Step 1: Verify Ubuntu Version<\/h5>\n\n\n\n<p>To install the right version of Swift on your system, first check the Ubuntu release and codename using the command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>lsb_release -a<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"765\" height=\"164\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-1.png\" alt=\"Verify Ubuntu version\" class=\"wp-image-12285\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-1.png 765w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-1-300x64.png 300w\" sizes=\"(max-width: 765px) 100vw, 765px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The output on the screen confirms the installed version, as such Ubuntu 24.04.1 on your system.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.2s8eyo1\"><\/a>Step 2: Update Ubuntu Repository<\/h5>\n\n\n\n<p>Update your Ubuntu repository list to check the missing or outdated files on your machine:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>sudo apt update<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"854\" height=\"232\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-2.png\" alt=\"Update Ubuntu repository\" class=\"wp-image-12286\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-2.png 854w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-2-300x81.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-2-768x209.png 768w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The screenshot above shows that installed packages are up to date. Thus, your Ubuntu 24.04 is ready to configure the Swift package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Download-the-Latest-\u201cSwift\u201d-on-Ubuntu-24.04\"><a id=\"post-12284-_heading=h.17dp8vu\"><\/a><strong>How to Download the Latest \u201cSwift\u201d on Ubuntu 24.04?<\/strong><\/h2>\n\n\n\n<p>The provided steps will download the Swift package on your Ubuntu 24.04.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.3rdcrjn\"><\/a>Step 1: Download the Latest \u201cSwift\u201d Binary<\/h5>\n\n\n\n<p>Download the latest release of Swift like<strong> 5.10.1<\/strong> for your Ubuntu 24.04 machine:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>wget https:\/\/download.swift.org\/swift-5.10.1-release\/ubuntu2404\/swift-5.10.1-RELEASE\/swift-5.10.1-RELEASE-ubuntu24.04.tar.gz<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"891\" height=\"414\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-3.png\" alt=\"Download Swift using wget\" class=\"wp-image-12287\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-3.png 891w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-3-300x139.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-3-768x357.png 768w\" sizes=\"(max-width: 891px) 100vw, 891px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The swift 5.10.1 release has been saved to the present working directory, such as \u201c\/Downloads\u201d.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.26in1rg\"><\/a>Step 2: Import \u201cSwift\u201d GPG Keys<\/h5>\n\n\n\n<p>Run the following script to Import the Swift GPG keys to your machine:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>wget -q -O - https:\/\/swift.org\/keys\/all-keys.asc | gpg --import -<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"535\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-4.png\" alt=\"Import Swift GPG keys\" class=\"wp-image-12288\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-4.png 893w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-4-300x180.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-4-768x460.png 768w\" sizes=\"(max-width: 893px) 100vw, 893px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"436\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-5.png\" alt=\"Import Swift GPG keys\" class=\"wp-image-12289\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-5.png 890w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-5-300x147.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-5-768x376.png 768w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This command ensures that the downloaded Swift package on your Ubuntu 24.04 is authentic and from a trusted source.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.lnxbz9\"><\/a>Step 3: Refresh Swift Keys on Ubuntu<\/h5>\n\n\n\n<p>To ensure you have added the latest version of the GPG keys, refresh the Swift GPG keys from the Ubuntu keyserver via the command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>gpg --keyserver hkp:\/\/keyserver.ubuntu.com --refresh-keys Swift<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"507\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-6.png\" alt=\"Refresh Swift keys on Ubuntu\" class=\"wp-image-12290\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-6.png 893w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-6-300x170.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-6-768x436.png 768w\" sizes=\"(max-width: 893px) 100vw, 893px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>With the above command, you will get the updated GPG keys to verify Swift packages.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.35nkun2\"><\/a>Step 4: Download Swift Signature File<\/h5>\n\n\n\n<p>To verify the Swift package file, first download the signature file using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>wget https:\/\/download.swift.org\/swift-5.10.1-release\/ubuntu2404\/swift-5.10.1-RELEASE\/swift-5.10.1-RELEASE-ubuntu24.04.tar.gz.sig<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"461\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-7.png\" alt=\"Download Swift Signature File\" class=\"wp-image-12291\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-7.png 824w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-7-300x168.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-7-768x430.png 768w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The Swift signature file will be downloaded with the \u201c.sig\u201d extension. Make sure you have downloaded the correct file.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.1ksv4uv\"><\/a>Step 5: Verify the Swift File<\/h5>\n\n\n\n<p>You can verify the authenticity of the downloaded Swift file through the given below command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>gpg --verify swift-5.10.1-RELEASE-ubuntu24.04.tar.gz.sig swift-5.10.1-RELEASE-ubuntu24.04.tar.gz<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"234\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-8.png\" alt=\"Verify Swift file\" class=\"wp-image-12292\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-8.png 890w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-8-300x79.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-8-768x202.png 768w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>After execution of the command, you will see a message (i.e. Good signature) confirming that the Swift signature is valid.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Configure-\u201cSwift\u201d-on-Ubuntu-24.04\"><a id=\"post-12284-_heading=h.44sinio\"><\/a><strong>How to Configure \u201cSwift\u201d on Ubuntu 24.04?<\/strong><\/h2>\n\n\n\n<p>To properly configure the Swift package, perform these commands from the terminal.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"Step-1:-Extract-the-Swift-Binary\"><a id=\"post-12284-_heading=h.2jxsxqh\"><\/a>Step 1: Extract the Swift Binary<\/h5>\n\n\n\n<p>Now, locate the downloaded Swift tarball file and run the command to extract the Swift binary to the current directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>tar xzf swift-5.10.1-RELEASE-ubuntu24.04.tar.gz<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"891\" height=\"49\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-9.png\" alt=\"Extract Swift binary\" class=\"wp-image-12293\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-9.png 891w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-9-300x16.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-9-768x42.png 768w\" sizes=\"(max-width: 891px) 100vw, 891px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>For example, if you have downloaded the Swift binary to the Downloads folder, first navigate to the folder using the command: \u201ccd Downloads\u201d<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.z337ya\"><\/a>Step 2: Move Swift to \u201c\/opt\u201d Directory<\/h5>\n\n\n\n<p>Execute the command to move the Swift directory to the \u201c\/opt\u201d directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>sudo mv swift-5.10.1-RELEASE-ubuntu24.04 \/opt\/swift<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"826\" height=\"73\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-10.png\" alt=\"Move Swift to opt directory\" class=\"wp-image-12294\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-10.png 826w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-10-300x27.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-10-768x68.png 768w\" sizes=\"(max-width: 826px) 100vw, 826px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Moving Swift files to a standard system path, such as \/opt, is mainly used for system-wide access to the package.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"Step-3:-Add-Swift-to-System-\u201cPATH\u201d\"><a id=\"post-12284-_heading=h.3j2qqm3\"><\/a>Step 3: Add Swift to System \u201cPATH\u201d<\/h5>\n\n\n\n<p>Now, add Swift to your PATH through the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>echo \"export PATH=\\$PATH:\/opt\/swift\/usr\/bin\" &gt;&gt; $HOME\/.profile<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"75\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-11.png\" alt=\"Add swift to system path\" class=\"wp-image-12295\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-11.png 829w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-11-300x27.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-11-768x69.png 768w\" sizes=\"(max-width: 829px) 100vw, 829px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This command allows you to run the Swift from any terminal session on your Ubuntu 24.04.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.1y810tw\"><\/a>Step 4: Update the PATH (\/.profile)<\/h5>\n\n\n\n<p>After adding Swift to the PATH (\/.profle), use the \u201csource\u201d command to update and apply the changes immediately:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>source $HOME\/.profile<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"49\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-12.png\" alt=\"Update the path\" class=\"wp-image-12296\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-12.png 827w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-12-300x18.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-12-768x46.png 768w\" sizes=\"(max-width: 827px) 100vw, 827px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.4i7ojhp\"><\/a>Step 5: Check the Swift Version<\/h5>\n\n\n\n<p>Finally, confirm the Swift installation on your Ubuntu 24.04 with the command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>swift --version<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"94\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-13.png\" alt=\"Check Swift version\" class=\"wp-image-12297\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-13.png 827w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-13-300x34.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-13-768x87.png 768w\" sizes=\"(max-width: 827px) 100vw, 827px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The above code will verify that you have successfully configured Swift 5.10.1, which is the latest version available for Ubuntu 24.04.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Launch-and-Test-\u201cSwift\u201d-on-Ubuntu-24.04\"><a id=\"post-12284-_heading=h.2xcytpi\"><\/a><strong>How to Launch and Test \u201cSwift\u201d on Ubuntu 24.04?<\/strong><\/h2>\n\n\n\n<p>You can launch, build, run, and test your Swift project from the Ubuntu 24.04 terminal.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.1ci93xb\"><\/a>Step 1: Launch Swift<\/h5>\n\n\n\n<p>To launch Swift, simply open your Ubuntu terminal and type the keyword \u201cswift\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>swift<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"826\" height=\"442\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-14.png\" alt=\"Launch Swift\" class=\"wp-image-12298\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-14.png 826w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-14-300x161.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-14-768x411.png 768w\" sizes=\"(max-width: 826px) 100vw, 826px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>You will see the greeting message \u201cWelcome to Swift!\u201d confirming that Swift is working properly on your Ubuntu 24.04.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.3whwml4\"><\/a>Step 2: Test \u201cSwift\u201d<\/h5>\n\n\n\n<p>You can test Swift in the terminal, using the below syntax:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><p>swift repl <br>print(\"Hello Swift!\")<\/p><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"823\" height=\"231\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-15.png\" alt=\"Test Swift\" class=\"wp-image-12299\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-15.png 823w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-15-300x84.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/word-image-12284-15-768x216.png 768w\" sizes=\"(max-width: 823px) 100vw, 823px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>If the script prints the statement, \u201cHello Swift!\u201d, it means Swift is running on your Ubuntu 24.04 system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-12284-_heading=h.qsh70q\"><\/a>Conclusion<\/h2>\n\n\n\n<p>Install and configure Swift on Ubuntu 24.04 through simple steps. First, download the <a href=\"#How-to-Download-the-Latest-\u201cSwift\u201d-on-Ubuntu-24.04\">Swift tarball<\/a> file, <a href=\"#post-12284-_heading=h.2jxsxqh\">extract<\/a> it, and move it to your system <a href=\"#Step-3:-Add-Swift-to-System-\u201cPATH\u201d\">PATH<\/a>. Then, start using it for development.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Swift is a modern programming language available for free. It can be configured on operating systems like Windows, Linux system (Ubuntu), and more. Currently, it is becoming one of the fastest programming languages due to its performance, speed, and simple syntax. Swift&#8217;s frameworks can be utilized for building complex web development projects. This article provides [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":12303,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[371,370,317],"class_list":["post-12284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-softwaredevelopment","tag-swift","tag-ubuntu-24-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Swift on Ubuntu 24.04 - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"This article provides simple steps for installing Swift on the Ubuntu 24.04 LTS (Long Term Support) system.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Swift on Ubuntu 24.04 - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"This article provides simple steps for installing Swift on the Ubuntu 24.04 LTS (Long Term Support) system.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-08T06:29:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-26T11:08:28+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install Swift on Ubuntu 24.04\",\"datePublished\":\"2024-09-08T06:29:20+00:00\",\"dateModified\":\"2024-09-26T11:08:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\"},\"wordCount\":709,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg\",\"keywords\":[\"Softwaredevelopment\",\"Swift\",\"Ubuntu 24.04\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\",\"name\":\"How to Install Swift on Ubuntu 24.04 - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg\",\"datePublished\":\"2024-09-08T06:29:20+00:00\",\"dateModified\":\"2024-09-26T11:08:28+00:00\",\"description\":\"This article provides simple steps for installing Swift on the Ubuntu 24.04 LTS (Long Term Support) system.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg\",\"width\":1020,\"height\":600,\"caption\":\"Install Swift on Ubuntu 24.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Swift on Ubuntu 24.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Swift on Ubuntu 24.04 - Greenwebpage Community","description":"This article provides simple steps for installing Swift on the Ubuntu 24.04 LTS (Long Term Support) system.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Swift on Ubuntu 24.04 - Greenwebpage Community","og_description":"This article provides simple steps for installing Swift on the Ubuntu 24.04 LTS (Long Term Support) system.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/","og_site_name":"Greenwebpage Community","article_published_time":"2024-09-08T06:29:20+00:00","article_modified_time":"2024-09-26T11:08:28+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install Swift on Ubuntu 24.04","datePublished":"2024-09-08T06:29:20+00:00","dateModified":"2024-09-26T11:08:28+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/"},"wordCount":709,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg","keywords":["Softwaredevelopment","Swift","Ubuntu 24.04"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/","name":"How to Install Swift on Ubuntu 24.04 - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg","datePublished":"2024-09-08T06:29:20+00:00","dateModified":"2024-09-26T11:08:28+00:00","description":"This article provides simple steps for installing Swift on the Ubuntu 24.04 LTS (Long Term Support) system.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2024\/09\/Install-Swift-on-Ubuntu-24.04.jpeg","width":1020,"height":600,"caption":"Install Swift on Ubuntu 24.04"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-swift-on-ubuntu-24-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install Swift on Ubuntu 24.04"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/12284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=12284"}],"version-history":[{"count":3,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/12284\/revisions"}],"predecessor-version":[{"id":12492,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/12284\/revisions\/12492"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/12303"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=12284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=12284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=12284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}