ubuntu系统使用总结

ubuntu 版本: Ubuntu 22.04.1 LTS 5.15.0-58.64-generic 5.15.74

官网wiki

crash调试

查看包内容

ddeb包: dpkg-deb -c xxx.deb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
baoze@baoze:~/workspace$ dpkg-deb -c ./linux-image-unsigned-5.15.0-58-generic-dbgsym_5.15.0-58.64_amd64.ddeb 
drwxr-xr-x root/root 0 2023-01-05 11:07 ./
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/boot/
-rw-r--r-- root/root 737158008 2023-01-05 11:07 ./usr/lib/debug/boot/vmlinux-5.15.0-58-generic
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/modules/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/modules/5.15.0-58-generic/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/modules/5.15.0-58-generic/kernel/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/modules/5.15.0-58-generic/kernel/arch/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/modules/5.15.0-58-generic/kernel/arch/x86/
drwxr-xr-x root/root 0 2023-01-05 11:07 ./usr/lib/debug/lib/modules/5.15.0-58-generic/kernel/arch/x86/crypto/
-rw-r--r-- root/root 258513 2023-01-05 11:07 ./usr/lib/debug/lib/modules/5.15.0-58-generic/kernel/arch/x86/crypto/aegis128-aesni.ko

关闭自动更新

修改 /etc/apt/apt.conf.d/10periodic/etc/apt/apt.conf.d/20auto-upgrades 文件,将所有值修改为 0

1
2
3
4
5
6
7
baoze@baoze:~$ cat /etc/apt/apt.conf.d/20auto-upgrades 
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
baoze@baoze:~$ cat /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";

确认ubuntu使用的上游内核版本

方法一:
查看 /proc/verison_signature 文件

1
2
baoze@baoze:~$ cat /proc/version_signature 
Ubuntu 5.15.0-58.64-generic 5.15.74

第一个字段总是Ubuntu,第二个字段表示 Ubuntu kernel version,第三个字段表示 Ubuntu依赖的上游kernel主干版本

方法二:
在ubuntu的kernel git中查看对应tag的Makefile文件
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/tree/Makefile?h=Ubuntu-5.15.0-58.64

1
2
3
4
5
6
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 74
EXTRAVERSION =
NAME = Trick or Treat

apt常用命令

apt remove –auto-remove gcc-aarch64-linux-gnu 自动卸载gcc-aarch64-linux-gnu软件及依赖gcc-aarch64-linux-gnu的软件

kvm环境配置