Ubuntu

2022-04-12

Ubuntu 是基于 [[Debian]] 的 Linux 发行版。

  • dpkg -L <pack_name> : 包安装位置 (“dpkg”是“Debian Package”的简写)
  • lsb_release -a : 查看版本号

更新

[[Docker]] 中运行时,需要更换镜像源:

Terminal window
# 先备份
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。