Linux
Loop Device Lifecycle Management
· β˜• 2 min read
1. Creating the Image File 1.1 When Loop Storage Fits Treat an ordinary file as a /dev/loopN block device: reads and writes go through the block device interface, while the backing file is still just a file on the host. Mounting ISO and disk images Local practice and stress testing

Ubuntu Package Dependencies and Change Management
· β˜• 2 min read
1. Viewing Package Dependencies 1.1 Forward Dependencies Which packages it depends on List dependencies 1 apt-cache depends apparmor 1 2 3 4 5 6 7 8 9 10 11 12 13 14 apparmor Depends: debconf # εΏ…ι‘» Depends: lsb-base # εΏ…ι‘» |Depends: debconf # εΏ…ι‘» Depends: <debconf-2.0>

How to Clean Up Zombie Processes
· β˜• 4 min read
1. What a Zombie Process Is How a process is created: The parent process calls fork() to create a child process The child process calls exec() to load a new program The child process finishes executing and calls exit() or returns The parent process calls wait() or waitpid() If the parent process never calls wait() or waitpid(), the child stays in the system after it finishes, becoming a zombie process.

Using the history Command
· β˜• 2 min read
1. The history Command The history command lets you view the command history of the current session. When you exit the shell, the command history is saved to the corresponding history file. For bash, the command history is saved in the ~/.bash_history file; for zsh, it is saved in ~/.zsh_history. You can also use the HISTFILE environment variable to specify the location of the history file: export HISTFILE=/data/ops/bash_history.

Switch to a Specific Kernel Version on Ubuntu
· β˜• 3 min read
1. Installing a New Kernel Version Installing from the apt repositories is recommended, so you avoid installing an incompatible kernel version. 1.1 Installing from the Repository List the available versions 1 2 3 4 apt list linux-headers-5.15.*-*-generic linux-image-5.15.*-*-generic linux-image-5.15.0-94-generic/focal-updates,focal-security 5.15.0-94.104~20.04.1 amd64 linux-image-5.15.0-97-generic/focal-updates,focal-security 5.15.0-97.107~20.04.1 amd64 Install the kernel 1 apt install linux-image-5.