<commit_before>.. _installation_linux:

Install Linux Host Dependencies
###############################

Documentation is available for these Linux distributions:

* Ubuntu
* Fedora
* Clear Linux
* Arch Linux

For distributions that are not based on rolling releases, some of the
requirements and dependencies may not be met by your package manager. In that
case please follow the additional instructions that are provided to find
software from sources other than the package manager.

.. note:: If you're working behind a corporate firewall, you'll likely
   need to configure a proxy for accessing the internet, if you haven't
   done so already.  While some tools use the environment variables
   ``http_proxy`` and ``https_proxy`` to get their proxy settings, some
   use their own configuration files, most notably ``apt`` and
   ``git``.

Update Your Operating System
****************************

Ensure your host system is up to date.

.. tabs::

   .. group-tab:: Ubuntu

      .. code-block:: console

         sudo apt-get update
         sudo apt-get upgrade

   .. group-tab:: Fedora

      .. code-block:: console

         sudo dnf upgrade

   .. group-tab:: Clear Linux

      .. code-block:: console

         sudo swupd update

   .. group-tab:: Arch Linux

      .. code-block:: console

         sudo pacman -Syu

.. _linux_requirements:

Install Requirements and Dependencies
*************************************

.. NOTE FOR DOCS AUTHORS: DO NOT PUT DOCUMENTATION BUILD DEPENDENCIES HERE.

   This section is for dependencies to build Zephyr binaries, *NOT* this
   documentation. If you need to add a dependency only required for building
   the docs, add it to doc/README.rst. (This change was made following the
   introduction of LaTeX->PDF support for the docs, as the texlive footprint is
   massive and not needed by users not building PDF documentation.)

Note that both Ninja and Make are installed with these instructions; you only
need one.

.. tabs::

   .. group-tab:: Ubuntu

      .. code-block:: console

         sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
           ccache dfu-util device-tree-compiler wget \
           python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file libpython3.8-dev \
           make gcc gcc-multilib g++-multilib libsdl2-dev

   .. group-tab:: Fedora

      .. code-block:: console

         sudo dnf group install "Development Tools" "C Development Tools and Libraries"
         dnf install git cmake ninja-build gperf ccache dfu-util dtc wget \
           python3-pip python3-tkinter xz file glibc-devel.i686 libstdc++-devel.i686 python38 \
           SDL2-devel

   .. group-tab:: Clear Linux

      .. code-block:: console<commit_msg>doc: getting_started: linux: fixup dnf usage<commit_after>.. _installation_linux:

Install Linux Host Dependencies
###############################

Documentation is available for these Linux distributions:

* Ubuntu
* Fedora
* Clear Linux
* Arch Linux

For distributions that are not based on rolling releases, some of the
requirements and dependencies may not be met by your package manager. In that
case please follow the additional instructions that are provided to find
software from sources other than the package manager.

.. note:: If you're working behind a corporate firewall, you'll likely
   need to configure a proxy for accessing the internet, if you haven't
   done so already.  While some tools use the environment variables
   ``http_proxy`` and ``https_proxy`` to get their proxy settings, some
   use their own configuration files, most notably ``apt`` and
   ``git``.

Update Your Operating System
****************************

Ensure your host system is up to date.

.. tabs::

   .. group-tab:: Ubuntu

      .. code-block:: console

         sudo apt-get update
         sudo apt-get upgrade

   .. group-tab:: Fedora

      .. code-block:: console

         sudo dnf upgrade

   .. group-tab:: Clear Linux

      .. code-block:: console

         sudo swupd update

   .. group-tab:: Arch Linux

      .. code-block:: console

         sudo pacman -Syu

.. _linux_requirements:

Install Requirements and Dependencies
*************************************

.. NOTE FOR DOCS AUTHORS: DO NOT PUT DOCUMENTATION BUILD DEPENDENCIES HERE.

   This section is for dependencies to build Zephyr binaries, *NOT* this
   documentation. If you need to add a dependency only required for building
   the docs, add it to doc/README.rst. (This change was made following the
   introduction of LaTeX->PDF support for the docs, as the texlive footprint is
   massive and not needed by users not building PDF documentation.)

Note that both Ninja and Make are installed with these instructions; you only
need one.

.. tabs::

   .. group-tab:: Ubuntu

      .. code-block:: console

         sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
           ccache dfu-util device-tree-compiler wget \
           python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file libpython3.8-dev \
           make gcc gcc-multilib g++-multilib libsdl2-dev

   .. group-tab:: Fedora

      .. code-block:: console

         sudo dnf group install "Development Tools" "C Development Tools and Libraries"
         sudo dnf install git cmake ninja-build gperf ccache dfu-util dtc wget \
           python3-pip python3-tkinter xz file glibc-devel.i686 libstdc++-devel.i686 python38 \
           SDL2-devel

   .. group-tab:: Clear Linux

      .. code-block:: console
{'fraction_non_alphanumeric': 0.10326867816091954, 'fraction_numerical': 0.006824712643678161, 'mean_word_length': 2.930134086097389, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7237787', 'n_tokens_mistral': 1591, 'n_tokens_neox': 1441, 'n_words': 637}