Ubuntu 是基于 [[Debian]] 的 Linux 发行版。
dpkg -L <pack_name>
: 包安装位置 (“dpkg”是“Debian Package”的简写)lsb_release -a
: 查看版本号
更新
在 [[Docker]] 中运行时,需要更换镜像源:
# 先备份cp /etc/apt/sources.list /etc/apt/sources.list.bak# 注释原有配置sed -i 's/^/#/' /etc/apt/sources.list# 新增源sed -i '$a\deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse\ndeb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse\ndeb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse' /etc/apt/sources.list
因为使用 https 源会报错: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-security/InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification。因此这里用的是 HTTP。