CentOS is derived from Red Hat Enterprise Linux (RHEL) but doesn’t require a license to run. The instructions below apply to both CentOS and RHEL 8.
First, open the Terminal application and run the following command to install the Extra Packages for Enterprise Linux (EPEL) repository:
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Note: This command requires administrator privileges, so it’ll ask for your password.
Next, install Swift and its dependencies:
sudo dnf install -y git swift-lang
You can now execute the swift
command to verify which version you have installed:
swift --version
Last updated: 23 Oct. 2021
Authors: Ron Olson, Steven Van Impe