Skip to content

Instantly share code, notes, and snippets.

@Anakiev2
Anakiev2 / How to install the Nvidia legacy driver (340xx or 390xx) on Debian 13 Trixie.md
Last active November 23, 2025 10:39
How to install the Nvidia legacy driver (340xx or 390xx) on Debian 13 Trixie

How to install the Nvidia legacy driver (340xx or 390xx) on Debian 13 Trixie

This guide will show you how to compile and install the legacy Nvidia driver on Debian. The steps bellow are compatible with both nvidia-legacy-340xx-driver and nvidia-legacy-390xx-driver and can be installed on Debian 13 (Trixie) as well as Debian 12 (Bookworm) or Debian 11 (Bullseye) in both 64-bit and 32-bit version. Execute the lines one by one and wait for every line to finish before proceeding to next. Only the lines starting with sudo should be executed as root. The lines with sudo pbuilder will take a lot of time.

To install the nvidia-legacy-390xx-driver version replace 340xx with 390xx everywhere bellow.
To install both 64-bit and 32-bit libraries for wine/steam you should run Step 2. twice.
It was confirmed that this method also works with the nvidia-tesla-470-driver version.

Step 1. Prepare:

Update, upgrade and install the required packages.

@IObert
IObert / .zhsrc
Last active March 3, 2021 11:02
Simple aliases to make the life of CF developers easier
function checkCfStatus () {
if echo $(cf a 2>&1 >/dev/null) | grep -q 'The token expired\|Not logged in' $OUTPUT; then
cf login
fi
}
function preexecHook () {
if echo $1 | grep -q "cf "; then
checkCfStatus
fi