How to Install Non-Free Packages on Debian12

Debian is a widely used Linux distribution that prioritizes free and open-source software. However, some users need non-free packages, such as proprietary drivers or firmware, to get their hardware fully working.
In this guide, we’ll walk through the correct and safe way to enable non-free repositories and install non-free packages, using su to switch to the root user (instead of sudo).

What Are Non-Free Packages?

“Non-free” in Debian refers to software that does not comply with the Debian Free Software Guidelines (DFSG). These packages may be required for:

  • Proprietary Wi-Fi or Ethernet drivers
  • GPU drivers (e.g., NVIDIA)
  • Firmware for wireless cards or Bluetooth
  • Multimedia codecs

Step 1: Switch to the Root User

Debian does not include sudo by default on all systems. If sudo is not available or doesn’t work, you should switch to the root account using:

su

Then enter the root password when prompted.

Step 2: Edit the sources.list File

Once you’re logged in as root, open the APT source list using an editor. If nano works on your system:

nano /etc/apt/sources.list

Step 3: Add contrib, non-free, and non-free-firmware

Modify each line to include the following components:

contrib non-free non-free-firmware

For example, change this:

deb http://deb.debian.org/debian bookworm main

To this:

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware

Step 4: Update the Package List

Still as root, run:

apt update

This refreshes your package index so it can find non-free packages.

Step 5: Install a Non-Free Package

Now that non-free repositories are enabled, you can install packages such as:

apt install firmware-realtek


EB-3362-L2C2_article

Main features of EB-3362-L2C2:

  • DM&P 32ビットx86 Vortex86DX3デュアルコア1.0GHz SoC
  • 2GB DDR3-1600MHzオンボード
  • SDカードスロット×1(SD、SDXC)、1GbpsLAN×1、10/100Mbps LAN×1、USB×4(前面×2、背面×1、内部×1)、ライン出力×1、RS-232×2
  • オートパワーオン対応
  • PXEディスクレスブートのサポート
  • DC +8V ~ +24V
  • 工作温度: 0~+60°C

詳細およびサンプルのご請求は、下記までお願いします。 info@icop.com.tw, call your nearest ICOP支店に, or contact our Worldwide Official Distributor.

お買い物カゴ
上部へスクロール