Article View: de.comp.os.unix.linux.misc
Article #351Re: NumLock / Console (gelöst)
From: Matthias Gerds
Date: Fri, 16 Oct 2026 15:48
Date: Fri, 16 Oct 2026 15:48
82 lines
3596 bytes
3596 bytes
Am Fri, 16 Oct 2026 14:30:23 +0200
schrieb Matthias Gerds <m.gerds@posteo.de>:
> Hallo!
>
> Vorweg: Ich starte hier ein Debian13-System ohne GUI, also nur per
> Console. Kriege es aber einfach nicht hin, dass NumLock beim Start
> eingeschaltet bleibt. Mag ja für Notebooks ohne Nummernblock die
> richtige Voreinstellung sein, aber nicht auf dem Desktop-PC:
>
> (1) BIOS/UEFI NumLock ist aktiviert (auch unter GRUB)
>
> (2) Script /etc/systemd/system/numlock.service erstellt:
> ===============
> [Service]
> ExecStartPre=/bin/sh -c 'setleds=+num < /dev/%I'
> ===============
> Systemctl-Dämonen neu geladen ... Kein Erfolg.
>
> (3) Eintrag 'LEDS=+num' in
> /etc/default/console-setup oder
> /etc/default/keyboard
> Kein Erfolg.
>
> Nach GRUB wird NumLock definitiv wieder ausgeschaltet.
>
> Evtl. nur ein Formfehler?
>
>
> P.S.: Unter KDE Plasma z.B. ist das kein Problem. Darum geht's mir
> aber nicht.
Habe es jetzt endlich hinbekommen, ok, das Llama3.2:8b hat geholfen:
Zeigt Ergebnisse für
debian 13 terminal only how to activate numlock before login
To activate NumLock before login on a Debian 13 terminal-only (TTY)
setup, you must enable it for the virtual consoles using a systemd
service that runs the setleds command.
1. Create the Systemd Service
Create a new service file to automate the activation of NumLock on all
virtual terminals:
[ sudo mkdir -p /etc/systemd/system ] if not exist
sudo nano /etc/systemd/system/numlock.service
==================================================
[Unit]
Description=Enable NumLock on all virtual consoles
After=getty.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'for tty in /dev/tty{1..6}; do setleds -D +num < "$tty"; done' RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
2. Enable and Start the Service
Enable the service so it runs automatically at boot and start it
immediately for the current session:
sudo systemctl daemon-reload
sudo systemctl enable --now numlock.service
This method ensures NumLock is active on all standard TTYs (/dev/tty1
through /dev/tty6) before any user logs in.
==================================================
Der Zahlenblock wird zwar mehrmals an- und ausgestellt während des
Bootvorgangs, ist aber VOR dem Consolen-Login an. Hatte ich mir
leichter vorgestellt, das Ganze ...
M:
--
Technical Details
Message-ID:
<20261016174854.7967decc@Mars>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<20261016143023.3a30a809@Mars>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Matthias Gerds <m.gerds@posteo.de> Newsgroups: de.comp.os.unix.linux.misc Subject: Re: NumLock / Console (gelöst) Date: Fri, 16 Oct 2026 17:48:54 +0200 Lines: 82 Message-ID: <20261016174854.7967decc@Mars> References: <20261016143023.3a30a809@Mars> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: individual.net Rxn3d4ckcvDyFezuORKw8wWI9zSGodR45L2DFBJjKlFQXp0n5C Cancel-Lock: sha1:Glv/WxDRattViTow9EXEuvTza6M= sha256:s4CMVb4qImuBaVAQqiHQOK48I9vsXwOOQAhowJ6uxU8= X-Newsreader: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-pc-linux-gnu)