This section describes the recommended way to download and make a fresh install of LinuxCNC. There are also Alternate Install Methods for the adventurous. If you have an existing install that you want to upgrade, go to the Updating LinuxCNC section instead.

Anmerkung
To operate machinery LinuxCNC requires a special kernel with real-time extensions. There are three possibilities here: preempt-rt, RTAI or Xenomai. In addition there are two versions of LinuxCNC which work with these kernels. See the table below for details. However for code testing and simulation it is possible to run the linuxcnc-uspace application on a stock kernel.

Fresh installs of LinuxCNC are most easily created using the Live/Install Image. This is a hybrid ISO filesystem image that can be written to a USB storage device or a DVD and used to boot a computer. At boot time you will be given a choice of booting the "Live" system (to run LinuxCNC without making any permanent changes to your computer) or booting the Installer (to install LinuxCNC and its operating system onto your computer’s hard drive).

Der Prozesses sieht grob umrissen wie folgt aus:

  1. Laden Sie das Live/Installations-Image herunter.

  2. Schreiben Sie das Image auf ein USB-Speichergerät oder eine DVD.

  3. Booten Sie das Live-System, um LinuxCNC zu testen.

  4. Booten Sie das Installationsprogramm, um LinuxCNC zu installieren.

1. Das Festplattenabbild (engl. kurz image) herunterladen

This section describes some methods for downloading the Live/Install image.

1.1. Normales Herunterladen

Software for LinuxCNC to download is presented on the project’s Downloads page. Most users will aim for the disk image for Intel/AMD PCs, the URL will resemble https://www.linuxcnc.org/iso/linuxcnc_2.9.4-amd64.hybrid.iso.

For the Raspberry Pi, multiple images are provided to address differences between the RPi4 and RPi5.

Anmerkung
Do not use the regular Raspbian distribution for LinuxCNC that may have shipped with your RPi starter kit - that will not have the real-time kernel and you cannot migrate from Raspbian to Debian’s kernel image.

1.2. Herunterladen mit zsync

zsync is a download application that efficiently resumes interrupted downloads and efficiently transfers large files with small modifications (if you have an older local copy). Use zsync if you have trouble downloading the image using the Normal Download method.

zsync unter Linux
  1. Installieren Sie zsync mit Synaptic oder indem Sie Folgendes in einem Terminal-Programm ausführen

    sudo apt-get install zsync
  2. Führen Sie dann diesen Befehl aus, um die Iso auf Ihren Computer herunterzuladen

    zsync https://www.linuxcnc.org/iso/linuxcnc_2.9.4-amd64.hybrid.iso
zsync unter Windows

There is a Windows port of zsync. It works as a console application and can be downloaded from https://www.assembla.com/spaces/zsync-windows/documents .

1.3. Überprüfen des Abbilds

(Dieser Schritt ist nicht erforderlich, wenn Sie zsync verwendet haben)

  1. Überprüfen Sie nach dem Herunterladen die Prüfsumme des Bildes, um die Integrität sicherzustellen.

md5sum linuxcnc-2.9.4-amd64.iso

oder

sha256sum linuxcnc-2.9.4-amd64.iso
  1. Vergleichen Sie dann mit diesen Prüfsummen

amd64 (PC)
md5sum: 1815aceaac0e7861747aa34d61846e79
sha256sum: 08b3f59233e47c91cf1c9a85c41df48542c97b134efefa7446d3060c9a3e644b
arm64 (Pi)
md5sum: 4547e8a72433efb033f0a5cf166a5cd2
sha256sum: ff3ba9b8dfb93baf1e2232746655f8521a606bc0fab91bffc04ba74cc3be6bf0
Überprüfen Sie md5sum auf Windows oder Mac

Windows und Mac OS X werden nicht mit einem md5sum-Programm ausgeliefert, aber es gibt Alternativen. Weitere Informationen finden Sie unter: How To MD5SUM

2. Schreiben des Abbilds auf ein bootfähiges Gerät

The LinuxCNC Live/Install ISO Image is a hybrid ISO image which can be written directly to a USB storage device (flash drive) or a DVD and used to boot a computer. The image is too large to fit on a CD.

2.1. Raspberry Pi Image

The Raspbery Pi image is a completes SD card image and should be written to an SD card with the [Raspberry Pi Imager App](https://www.raspberrypi.com/software/).

2.2. AMD-64 (x86-64, PC) Image using GUI tools

Download and install [Balena Etcher](https://etcher.balena.io/#download-etcher) (Linux, Windows, Mac) and write the downloaded image to a USB drive.

If your image fails to boot then please also try Rufus. It looks more complicated but seems to be more compatible with various BIOSes.

2.3. Command line - Linux

  1. Schließen Sie ein USB-Speichergerät an (z. B. ein Flash-Laufwerk oder ein Gerät vom Typ Thumb Drive).

  2. Ermitteln Sie die Gerätedatei, die dem USB-Flash-Laufwerk entspricht. Diese Information finden Sie in der Ausgabe von dmesg, nachdem Sie das Gerät angeschlossen haben. /proc/partitions kann ebenfalls hilfreich sein.

  3. Verwenden Sie den Befehl dd, um das Image auf Ihr USB-Speichergerät zu schreiben. Wenn Ihr Speichergerät zum Beispiel als /dev/sde angezeigt wird, verwenden Sie diesen Befehl:

    dd if=linuxcnc_2.9.4-amd64.hybrid.iso of=/dev/sde

2.4. Command line - MacOS

  1. Öffnen Sie ein Terminal und geben Sie ein

    diskutil list
  2. Stecken Sie den USB-Stick ein und notieren Sie sich den Namen der neuen Festplatte, die angezeigt wird, z. B. /dev/disk5

  3. unmount the USB. The number found above should be substitued in place of the N

    diskutil unmountDisk /dev/diskN
  4. Transfer the data with dd, as for Linux above. Note that the disk name has an added "r" at the begining

    sudo dd if=linuxcnc_2.9.4-amd64.hybrid.iso of=/dev/rdiskN bs=1m
  5. Bitte beachten Sie, dass dieser Vorgang sehr lange dauern kann und dass Sie während des Vorgangs keine Rückmeldung erhalten.

Schreiben des Abbilds auf eine DVD unter Linux
  1. Legen Sie einen DVD-Rohling in Ihren Brenner ein. Ein Fenster "CD/DVD Creator" oder "Disc-Typ auswählen" wird angezeigt. Schließen Sie es, da wir es nicht verwenden werden.

  2. Suchen Sie das heruntergeladene Bild im Dateibrowser.

  3. Klicken Sie mit der rechten Maustaste auf die ISO-Image-Datei und wählen Sie Write to Disc.

  4. Wählen Sie die Schreibgeschwindigkeit. Es wird empfohlen, mit der niedrigstmöglichen Geschwindigkeit zu schreiben.

  5. Starten Sie den Brennvorgang.

  6. Wenn ein Fenster "Wählen Sie einen Dateinamen für das Disk-Image" erscheint, wählen Sie einfach OK.

Schreiben des Abbilds auf eine DVD unter Windows
  1. Laden Sie Infra Recorder, ein kostenloses und quelloffenes Bildbrennprogramm, herunter und installieren Sie es: http://infrarecorder.org/

  2. Legen Sie eine leere CD in das Laufwerk ein und wählen Sie Nichts tun oder Abbrechen, wenn ein Dialogfeld für die automatische Ausführung erscheint.

  3. Open Infra Recorder, and select the Actions menu, then Burn image.

Schreiben des Abbilds auf eine DVD unter Mac OSX
  1. Die .iso-Datei herunterladen

  2. Klicken Sie mit der rechten Maustaste auf die Datei im Finder-Fenster und wählen Sie "Auf einen Datenträger brennen" (die Option zum Brennen auf einen Datenträger wird nur angezeigt, wenn der Computer über ein optisches Laufwerk verfügt oder angeschlossen ist)

3. Testen von LinuxCNC

Schalten Sie den Computer mit dem angeschlossenen USB-Speichergerät oder der DVD im DVD-Laufwerk aus und schalten Sie ihn dann wieder ein. Dadurch wird der Computer vom Live/Installationsabbild gebootet und die Option Live-Boot gewählt.

Anmerkung
If the system does not boot from the DVD or USB stick, it may be necessary to change the boot order in the PC BIOS.

Sobald der Computer hochgefahren ist, können Sie LinuxCNC ausprobieren, ohne es zu installieren. Sie können keine benutzerdefinierten Konfigurationen erstellen oder ändern die meisten Systemeinstellungen in einer Live-Sitzung, aber Sie können (und sollten) den Latenz-Test durchführen.

Um LinuxCNC auszuprobieren: Wählen Sie aus dem Menü Anwendungen/CNC den Eintrag LinuxCNC. Es öffnet sich ein Dialogfeld, aus dem Sie eine von vielen Beispielkonfigurationen auswählen können. An diesem Punkt ist es nur wirklich sinnvoll, eine "sim" Konfiguration zu wählen. Einige der Beispielkonfigurationen enthalten auf dem Bildschirm 3D simulierte Maschinen, suchen Sie nach "Vismach", um diese zu sehen.

Um festzustellen, ob Ihr Computer für die Erzeugung von Software-Schrittimpulsen geeignet ist, führen Sie den Latenztest wie folgt aus: here.

At the time of writing the Live Image is only available with the preempt-rt kernel and a matching LinuxCNC. On some hardware this might not offer good enough latency. There is an experimental version available using the RTAI realtime kernel which will often give better latency.

4. LinuxCNC installieren

To install LinuxCNC from the Live CD select Install (Graphical) at bootup.

5. Updates to LinuxCNC

Mit der normalen Installation der Update-Manager wird Sie über Updates zu LinuxCNC, wenn Sie online gehen und ermöglichen es Ihnen, einfach zu aktualisieren, ohne Linux Kenntnisse erforderlich. Es ist OK, alles außer dem Betriebssystem zu aktualisieren, wenn gefragt.

Warnung
Aktualisieren Sie das Betriebssystem nicht, wenn Sie dazu aufgefordert werden. Sie sollten jedoch Betriebssystem Aktualisierungen akzeptieren, insbesondere Sicherheitsaktualisierungen.

6. Install Problems

In seltenen Fällen kann es vorkommen, dass Sie das BIOS auf die Standardeinstellungen zurücksetzen müssen, wenn während der Live-CD-Installation die Festplatte beim Booten nicht erkannt wird.

7. Alternate Install Methods

The easiest, preferred way to install LinuxCNC is to use the Live/Install Image as described above. That method is as simple and reliable as we can make it, and is suitable for novice users and experienced users alike. However, this will typically replace any existing operating system. If you have files on the target PC that you want to keep, then use one of the methods described in this section.

Zusätzlich werden für erfahrene Benutzer, die mit der Debian-Systemadministration vertraut sind (Installations-Images finden, apt-Quellen manipulieren, Kernel-Flavors ändern usw.), Neuinstallationen auf den folgenden Plattformen unterstützt: ("amd64" bedeutet "64-bit" und ist nicht spezifisch für AMD-Prozessoren, es läuft auf jedem 64-bit x86-System)

Distribution Architektur Kernel Paket-Name Typische Verwendung

Debian Bookworm

amd64 & arm64

preempt-rt

linuxcnc-uspace

Maschinensteuerung und -simulation

Debian Bookworm

amd64

RTAI

linuxcnc

machine control

Debian Bullseye

amd64

preempt-rt

linuxcnc-uspace

Maschinensteuerung und -simulation

Debian Buster

amd64 & arm64

preempt-rt

linuxcnc-uspace

Maschinensteuerung und -simulation

Debian Buster

amd64

RTAI

linuxcnc

machine control

Jede (engl. any)

Jede (engl. any)

LinuxCNC direkt nach der Installation

linuxcnc-uspace

simulation ONLY

Anmerkung
LinuxCNC v2.9 is not supported on Debian 9 or older.
Preempt-RT-Kernel

The Preempt-rt kernels are available for Debian from the regular debian.org archive. The package is called linux-image-rt-*. Simply install the package in the same way as any other package from the Synaptic Package manager or with apt-get at the command-line.

RTAI-Kernel

Die RTAI-Kernel stehen im linuxcnc.org-Debian-Archiv zum Download bereit. Die apt-Quelle ist:

  • Debian Bookworm: deb http://linuxcnc.org bookworm base

  • Debian Bullseye: deb http://linuxcnc.org bullseye base

  • Debian Buster: deb http://linuxcnc.org buster base

LinuxCNC and the RTAI kernel are now only available for 64-bit OSes but there are very few surviving systems that can not run a 64-bit OS.

7.1. Installing on Debian Bookworm (with Preempt-RT kernel)

  1. Install Debian Bookworm (Debian 12), amd64 version. You can download the installer here: https://www.debian.org/distrib/

  2. After burning the iso and booting up if you don’t want Gnome desktop select Advanced Options > Alternative desktop environments and pick the one you like. Then select Install or Graphical Install.

    Warnung
    Geben Sie kein root-Passwort ein, da sonst sudo deaktiviert ist und Sie die folgenden Schritte nicht ausführen können.
  3. Führen Sie das Folgende in einem Terminal aus, um den Rechner auf den neuesten Stand der Pakete zu bringen.

    sudo apt-get update
    sudo apt-get dist-upgrade
Anmerkung
It is possible to download a version of LinuxCNC directly from Debian but this will install an old pre-release version, and is not recommended at this time.
  1. Install the Preempt-RT kernel and modules

    sudo apt-get install linux-image-rt-amd64
  2. Re-boot, and select the Linux 6.1.0-10-rt-amd64 kernel. The exact kernel version might be different, look for the "-rt" suffix. This might be hidden in the "Advanced options for Debian Bookworm" sub-menu in Grub. When you log in, verify that `PREEMPT RT`is reported by the following command.

    uname -v
  3. Öffnen Sie Menü Anwendungen > System > Synaptic Package Manager, suchen Sie nach linux-image und klicken Sie mit der rechten Maustaste auf das ursprüngliche Nicht-rt und wählen Sie "Zur vollständigen Entfernung markieren". Neu starten. Damit wird das System gezwungen, vom RT-Kernel zu booten. Wenn Sie es vorziehen, beide Kernel beizubehalten, müssen die anderen Kernel nicht gelöscht werden, aber es sind Änderungen an der Grub-Boot-Konfiguration erforderlich, die den Rahmen dieses Dokuments sprengen.

  4. Add the LinuxCNC Archive Signing Key to your apt keyring by downloading [the LinuxCNC installer script](https://www.linuxcnc.org/linuxcnc-install.sh) You will need to make the script executable to run it:

chmod +x linuxcnc-install.sh
Then you can run the installer:
sudo ./linuxcnc-install.sh

7.2. Installing on Debian Bookworm (with experimental RTAI kernel)

  1. This kernel and LinuxCNC version can be installed on top of the Live DVD install, or alternatively on a fresh Install of Debian Bookworm 64-bit as described above.

  2. You can add the LinuxCNC Archive signing key and repository information by downloading and running the installer script as decribed above. If an RTAI kernel is detected it will stop before installing any packages.

  3. Aktualisieren Sie die Paketliste von linuxcnc.org

    sudo apt-get update
  4. Install the new realtime kernel, RTAI and the rtai version of linuxcnc.

    sudo apt-get install linuxcnc

Reboot the machine, ensuring that the system boots from the new 5.4.258-rtai kernel.

7.3. Installing on Raspbian 12

Don’t do that. The latencies are too bad with the default kernel and the PREEMPT_RT (the RT is important) kernel of Debian does not boot on the Pi (as of 1/2024). Please refer to the images provided online. You can create them yourself following the scripts provided online.