{% extends "base.html" %}
{% load cache %}
{% load static %}
{% load flags %}
{% load pgp %}

{% block title %}Arch Linux - Downloads{% endblock %}

{% block head %}
<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen" />
<link rel="alternate" type="application/rss+xml" title="Arch Linux Releases" href="/feeds/releases/" />
{% endblock %}

{% block navbarclass %}anb-download{% endblock %}

{% block content %}
<div id="arch-downloads" class="box">

    <h2>Arch Linux Downloads</h2>

    <h3>Release Info</h3>

    <p>The image can be burned to a DVD, mounted as an ISO file,
    or be <a href="https://wiki.archlinux.org/title/USB_flash_installation_medium">directly written to a USB flash drive</a>.
    It is intended for new installations only; an existing Arch Linux system
    can always be updated with <code>pacman -Syu</code>.</p>

    <p>Images for installing Arch can be downloaded via <a href="#bittorrent-download">BitTorrent</a> or right here in your browser from one of the <a href="#http-downloads">Arch HTTP(S) mirrors down below</a>.</p>

    <ul>
        {% if release.version %}<li><strong>Current Release:</strong> {{ release.version }}</li>{% endif %}
        {% if release.kernel_version %}<li><strong>Included Kernel:</strong> {{ release.kernel_version }}</li>{% endif %}
        {% if release.torrent_data %}<li><strong>ISO Size:</strong> {{ release.torrent.file_length|filesizeformat }}</li>{% endif %}
        <li><a href="https://wiki.archlinux.org/title/Installation_guide">Installation Guide</a></li>
        <li><strong>Resources:</strong>
            <ul>
                <li><a href="https://gitlab.archlinux.org/archlinux/archiso/-/issues"
                    title="Arch Linux Gitlab:Archiso">Issue tracker</a></li>
                <li><a href="https://lists.archlinux.org/mailman3/lists/arch-releng.lists.archlinux.org/"
                    title="Arch Linux Release Engineering mailing list">Mailing List</a></li>
            </ul>
        </li>
    </ul>

    {% if release.info %}
    <h3>Release Notes</h3>

    <div class="article-content">{{ release.info_html }}</div>
    {% endif %}

    <h3>Existing Arch Users</h3>

    <p>If you are an existing Arch user, there is no need to download a new ISO
    to update your existing system. You may be looking for
    <a href="{% url 'mirrorlist' %}">an updated mirrorlist</a> instead.</p>

    <h3 id="bittorrent-download">BitTorrent Download (recommended)</h3>

    <p>If you can spare the bytes, please leave the client open after your
    download is finished, so you can seed it back to others.
    <br/>
    <strong>A DHT capable client is required.</strong>
    A WebSeed capable client is recommended for fastest download speeds.</p>

    {% if release %}<ul>
        <li><a href="{{ release.magnet_uri }}"
            title="Magnet link">Magnet link for {{ release.version }} <img width="12" height="12" src="{% static "magnet.png" %}" alt=""/></a></li>
        <li><a href="{% url 'releng-release-torrent' release.version %}"
            title="Download torrent">Torrent for {{ release.version }}<img width="12" height="12" src="{% static "download.png" %}" alt=""/></a></li>
    </ul>{% endif %}

    <h3>Netboot</h3>

    <p>If you have a wired connection, you can boot the latest release directly over the network.</p>
    <ul>
        <li><a href="{% url 'releng-netboot-info' %}"
            title="Arch Linux Netboot">Arch Linux Netboot</a></li>
    </ul>

    <h3>Docker image</h3>

    <p>The official Docker image is available on <a href="https://hub.docker.com/_/archlinux/">Docker Hub</a>. You can run the image with the following command:</p>
    <code>docker run -it archlinux</code>

    <h3>VM images</h3>

    <p>Official virtual machine images are available for download on our <a href="https://gitlab.archlinux.org/archlinux/arch-boxes/-/packages">GitLab instance</a>, more information is available in the <a href="https://gitlab.archlinux.org/archlinux/arch-boxes/">README</a>.</p>

    <h3>WSL images</h3>

    <p>The official WSL image can be installed with the following command (in a PowerShell prompt from a Windows system with WSL 2 installed):</p>
    <code>wsl --install archlinux</code>

    <p>It is also available for download on <a href="https://fastly.mirror.pkgbuild.com/wsl/latest">mirrors</a>.</p>
    <p>More information available in the <a href="https://wiki.archlinux.org/title/Install_Arch_Linux_on_WSL">Wiki</a>.</p>

    <h3 id="http-downloads">HTTP Direct Downloads</h3>

    <p>In addition to the BitTorrent links above, install images can also be
    downloaded via HTTP from the <a href="#download-mirrors">mirror sites listed below</a>. Please
    ensure the download image matches the checksum from the <code>sha256sums.txt</code> or <code>b2sums.txt</code> file linked below.</p>

    <h4 id="checksums">Checksums and signatures</h4>
    <p>File integrity checksums and PGP signatures for the latest releases can be found below:</p>

    <ul>
        <li>ISO
            <ul>
                <li><a href="https://archlinux.org/{{ release.iso_url }}.sig"
                    title="ISO PGP signature">PGP signature</a></li>
                {% if release.pgp_key %}<li><strong>PGP fingerprint:</strong> {% pgp_key_link release.pgp_key %}</li>{% endif %}
                {% if release.sha256_sum %}<li><strong>SHA256:</strong> {{ release.sha256_sum }}</li>{% endif %}
                {% if release.b2_sum %}<li><strong>BLAKE2b:</strong> {{ release.b2_sum }}</li>{% endif %}
                {% if release.sha1_sum %}<li><strong>SHA1:</strong> {{ release.sha1_sum }}</li>{% endif %}
                {% if release.md5_sum %}<li><strong>MD5:</strong> {{ release.md5_sum }}</li>{% endif %}
            </ul>
        </li>
        <li>Bootstrap tarball
            <ul>
                <li><a href="https://archlinux.org/{{ release.tarball_url }}.sig"
                    title="Bootstrap tarball PGP signature">PGP signature</a></li>
            </ul>
        </li>
        {% if release.sha256_sum %}<li><a href="https://archlinux.org/{{ release.dir_url }}/sha256sums.txt">sha256sums.txt</a></li>{% endif %}
        {% if release.b2_sum %}<li><a href="https://archlinux.org/{{ release.dir_url }}/b2sums.txt">b2sums.txt</a></li>{% endif %}
        {% if release.sha1_sum %}<li><a href="https://archlinux.org/{{ release.dir_url }}/sha1sums.txt">sha1sums.txt</a></li>{% endif %}
        {% if release.md5_sum %}<li><a href="https://archlinux.org/{{ release.dir_url }}/md5sums.txt">md5sums.txt</a></li>{% endif %}
    </ul>

    <h5>Download verification</h5>

    Verify the BLAKE2b checksums as follows:
    <pre><code>$ b2sum -c b2sums.txt</code></pre>

    To verify the PGP signature using Sequoia, first download the release signing key from WKD:
    <pre><code>$ sq network wkd search {{ release.wkd_email }} --output release-key.pgp</code></pre>

    With this signing key, verify the signature:
    <pre><code>$ sq verify --signer-file release-key.pgp --signature-file archlinux-{{ release.version }}-x86_64.iso.sig archlinux-{{ release.version }}-x86_64.iso</code></pre>

    Alternatively, using GnuPG, download the signing key from WKD:
    <pre><code>$ gpg --auto-key-locate clear,wkd -v --locate-external-key {{ release.wkd_email }}</code></pre>
    Verify the signature:
    <pre><code>$ gpg --verify archlinux-{{ release.version }}-x86_64.iso.sig archlinux-{{ release.version }}-x86_64.iso</code></pre>

    {% cache 600 download-mirrors %}
    <div id="download-mirrors">
        {% regroup mirror_urls by country as grouped_urls %}
        {% for country in grouped_urls %}
        {% if country.grouper %}<h5>{% country_flag country.grouper %}{{ country.grouper.name }}</h5>
        {% else %}<h5>Worldwide</h5>{% endif %}
        <ul>
            {% for mirror_url in country.list %}
            <li><a href="{{ mirror_url.url }}{{ release.dir_path }}"
                title="Download from {{ mirror_url.url }}">{{ mirror_url.mirror.name }}</a></li>
            {% endfor %}
        </ul>
        {% endfor %}
    </div>
    {% endcache %}

    <p>If you want to become an Official Arch Linux Mirror please follow the
    instructions listed <a href="https://wiki.archlinux.org/title/DeveloperWiki:NewMirrors">here</a>.</p>

</div>
{% endblock %}
