some tricky operate or configure for ubuntu.

Kernel Manage

upgrade kernel to HWE(Hardware Enablement) kernel

sudo apt install linux-generic-hwe-20.04

prevent kernel upgrade

ran command :

uname -r

to find Kernel Version. It gave output:

5.15.0-52-generic

Then I ran command:

sudo apt-mark hold 5.15.0-52-generic

Disable auto update

Edit the configuration file for the package management system by running the following command:

vim /etc/apt/apt.conf.d/20auto-upgrades

This file controls the behavior of automatic updates. Comment out the lines that enable automatic updates by adding a // at the beginning of each line or by removing the lines completely.

//APT::Periodic::Update-Package-Lists "0";
//APT::Periodic::Download-Upgradeable-Packages "0";
//APT::Periodic::AutocleanInterval "0";
//APT::Periodic::Unattended-Upgrade "0";

Restart the unattended-upgrades service to apply the changes by running the following command:

sudo systemctl restart unattended-upgrades

all done!

Disable or Enable Animations

sudo apt install gnome-tweaks

Open Tweaks in Gnome GUI Desktop, In General –> Animations –> Off.

pre-installation 脚本 子进程返回错误状态 1

首先,删除先前的安装尝试。使用以下命令删除 Packet Tracer

sudo apt-get remove packettracer

用以下命令解压软件包(将 /path/to 替换为软件包的实际路径):

mkdir packettracer
dpkg-deb -R /path/to/Packet_Tracer821_amd64_signed.deb packettracer

打开 DEBIAN/preinst 文件进行编辑, 在文件的开头添加 exit 0,保存并关闭文件。:

cd packettracer
sudo vim DEBIAN/preinst

like below:

#!/bin/sh -e

exit 0

# Source debconf library.
. /usr/share/debconf/confmodule

返回到 packettracer 目录,并使用以下命令重新打包软件包:

cd ..
dpkg-deb -b packettracer packettracer_modified.deb

现在,使用以下命令重新安装修改后的软件包:

sudo dpkg -i packettracer_modified.deb