Debian

Debian是完全由自由软件组成的Linux发行版,由Debian社区维护。UbuntuKali LinuxDeepin等众多知名发行版都是基于Debian构建。

简介

时间轴

  • 1993年8月16日,一名美国普渡大学学生伊恩·默多克(Ian Murdock)发布Debian 0.01。
  • 1996年,发布Debian 1.0。


了解更多 >> 维基百科:Debian - 历史


软件

软件管理

常用软件

安装驱动

安装Nvidia显卡驱动

方法 描述
Debian软件库安装 推荐方法,简单快捷可更新。

步骤:
1.安装Kernel headers,NVIDIA驱动构建时要用到。可以使用lscpu查看操作系统类型。一般为64位操作系统,使用命令安装:sudo apt install linux-headers-amd64
2.添加contrib non-free 软件仓库源。编辑sources.list sudo vim /etc/apt/sources.list加入如下内容:
deb http://deb.debian.org/debian/ sid main contrib non-free
3.更新软件库,安装nvidia-driver包和必要固件:
apt update
apt install nvidia-driver firmware-misc-nonfree
4.如果UEFI模式,需要导入签名。
5.重启系统 reboot,验证是否安装成功 sudo nvidia-smi
NVIDIA官网驱动安装 可以安装最新版本的Nvidia驱动程序,适合新出的显卡或需要最新版驱动。

步骤:
1.查看显卡信号 lspci | grep -E "VGA|3D",如GeForce GTX 980 Ti
2.官网对应信号下载驱动:https://www.nvidia.com/drivers 。下载好的文件移动到目录下,因为中文的下载目录在终端显示乱码
3.安装Kernel headers,NVIDIA驱动构建时要用到。可以使用lscpu查看操作系统类型。一般为64位操作系统,使用命令安装:sudo apt install linux-headers-amd64
4.禁用默认的 nouveau 驱动,创建并编辑配置文件sudo vim /etc/modprobe.d/blacklist-nouveau.conf,添加如下内容:
blacklist nouveau
options nouveau modeset=0
5.更新initramfs,sudo update-initramfs -u
6.按Ctrl+Alt+F1切换到命令终端并登陆,关闭图形界面sudo service lightdm stop
7.安装驱动,sudo bash NVIDIA-Linux-x86_64-470.94.run

常见问题:

ERROR: Unable to find the kernel source tree for the currently running kernel.  Please make sure you have installed the kernel     
       source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have 
       the 'kernel-source' or 'kernel-devel' RPM installed.  If you know the correct kernel source files are installed, you may    
       specify the kernel source path with the '--kernel-source-path' command line option.

没有安装正确的Kernel headers,可以使用lscpu查看操作系统类型。一般为64位操作系统,使用命令安装:sudo apt install linux-headers-amd64

WARNING: Unable to determine the path to install the libglvnd EGL vendor library config files. Check that you have pkg-config and 
         the libglvnd development libraries installed, or specify a path with --glvnd-egl-config-path.

警告,可以不安装

了解更多 >> Debian wiki:NVIDIA图形驱动 linuxcapable.com:如何在-debian-11-Bullseye-上安装或升级-nvidia-驱动程序 medium.com:Socratic Datum - Setting up Ubuntu and Docker for deep learning


常见设置

将用户添加到sudo组

# 切换到root
su

# 添加用户到sudo组,重启系统
usermod -aG sudo 用户名

# 检查是否添加成功
id 用户名


资源

官网

相关网站

相关文章