I installed a Debian Linux OS today, but found that the default text editor is nano, which I am not familiar with. After searching how to set text editor using google, I got the solution. Two environment variables can be… Read More
boilerplate code for Linux getopt
Linux getopt command is often used to parse script options. I find a piece of boilerplate code for this command and mark it in this post for further reference. set -eu set +e options=$(getopt –name “demo.sh” -o “f:d” -l “file:,debug”… Read More
disk block size vs filesystem block size
In this post, I will briefly describe the differences between disk block size and filesystem block size. In the computer architecture, every byte in the main memory has a unique address. In x86 arch, the CPU can read 4 bytes… Read More
extract files from rpm packages
These days I am developing a feature involving rpm packages. Sometimes I need to extract the files from the rpm package instead of installing it. I mark the command here for further reference. rpm2cpio demo.rpm | cpio -idmv
install chrome in ubuntu and rhel linux
Chrome is an excellent web browser nowadays. It is widely used by normal users and web developers in Microsoft Windows OS. Sometimes, it is also desirable to use Chrome in Linux OS. This post describes the steps to install Chrome… Read More
bash command history
Yesterday morning after arriving at the office, I booted up my laptop as usual and tried to connect to my Linux development server using putty. However, the ssh connection couldn’t be established successfully. After struggling for a while, I found… Read More
an introduction to policy-based routing in Linux
A few days ago I was assigned a task to create pods with multiple network interfaces in the Kubernetes. It is not a difficult task, because it only requires a few annotations for the pods, provided that the CNI network… Read More
list files in a package in ubuntu
The below command can be used to list files in a package in Ubuntu apt-file list <package-name> or dpkg -L <package-name> for example, apt-file list openjdk-8-doc or dpkg -L openjdk-8-doc
a quick reference to Linux od command
Yesterday my colleague reported a software issue to me. I checked the application logic, but couldn’t find any clue. However, because the software hasn’t been touched for a long time and has passed the testing in the last release, I… Read More
fix ‘could not connect to display’ issue
Today I tried to run foxit reader installer in my Ubuntu Linux as root account. I got the below error message: QXcbConnection: Could not connect to display After struggling for a while, I found the below solution that fix this… Read More