Welcome to Cyrus Yip’s blog. It contains articles about Linux, programming, etc. I may write anything.
How to Install the Latest Microcode on Proxmox VE (Debian stable)
In this tutorial, I will help you install the latest microcode in a upgradable way so that you can upgrade it via apt command. Please don’t install packages except microcode packages from the unstable repository to avoid a broken system. This tutorial was tested on Proxmox VE 7.4 / 8.0.2 . Microcode is the firmware used to fix bugs in the CPU. It should be installed only on the host instead of virtual machines because microcode updates are applied during boot. We need to install it from the Debian unstable repository because microcode packages in Proxmox (Debian stable) may be out of date.
Upgrading NixOS to Unstable Channel
As an Arch Linux user, I am used to using the lastest packages. Thus, I upgrade my NixOS to unstable channel. 1 2 3 4 5 # switch channel sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos sudo nixos-rebuild switch --upgrade # show version nixos-version References: Upgrading NixOS - NixOS manual https://channels.nixos.org/
Fixing File Permission Problem of Jellyfin on Arch Linux
This tutorial should work for other Linux distributions, but I only tested it on Arch Linux. In order to add a directory to a Jellyfin library, Jellyfin needs to access the directory and all its parent directories. If you add ~/Videos to a library, Jellyfin fails to access it. Jellyfin runs as user jellyfin. Jellyfin can access ~/Videos (other::r-x) but can’t access its parent ~ (other::---). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ❯ getfacl ~/Videos getfacl: Removing leading '/' from absolute path names # file: home/cyrusyip/Videos # owner: cyrusyip # group: cyrusyip user::rwx group::r-x mask::r-x other::r-x ❯ getfacl ~ getfacl: Removing leading '/' from absolute path names # file: home/cyrusyip # owner: cyrusyip # group: cyrusyip user::rwx group::--- mask::--- other::--- To fix it, grant Jellyfin execution permission for the home directory.
Removing Python 2 on Arch Linux
Python 2 was dropped from Arch Linux. It was lucky that there were only two python2 packages on my Arch. 1 2 3 4 5 ❯ pacman -Qs python2 local/python2 2.7.18-5 A high-level scripting language local/python2-setuptools 2:44.1.1-2 Easily download, build, install, upgrade, and uninstall Python packages I removed them without hesitation. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ❯ sudo pacman -Rscn python2 python2-setuptools checking dependencies... Package (2) Old Version Net Change python2 2.7.18-5 -76.84 MiB python2-setuptools 2:44.1.1-2 -3.81 MiB Total Removed Size: 80.65 MiB :: Do you want to remove these packages? [Y/n] :: Processing package changes... (1/2) removing python2-setuptools (2/2) removing python2 :: Running post-transaction hooks... (1/2) Arming ConditionNeedsUpdate... (2/2) Refreshing PackageKit...
How to Paste over Selected Text without Overwriting the Unnamed Register in Vim
Summary: paste with P in visual mode. It’s painful to paste over selected text in Vim, because the unnamed register is overwritten by the selected text. Thus, we can not paste the original yanked text twice. If you have a file: 1 2 hello kitty You want to copy hello , paste it over kitty, and paste it again. You type these commands in Vim. 1 2 3 4 5 gg " move to the top yy " copy current line jV " move to the next line and select it p " paste over the select line p " paste again You expect to get:
How to Ignore Kernel Upgrades on Arch Linux
Warning: Ignoring kernel upgrades makes the system more vulnerable due to the lack of the latest security fixes. Ignore Temporarily # Pacman’s --ignore option is used to ignore package upgrades. You can ignore multiple packages, separated by commas. This command upgrades the system but ignores three kernels. 1 sudo pacman -Syu --ignore linux,linux-header,linux-lts,linux-lts-headers,linux-zen,linux-zen-headers Ignore Permanently # Typing --ignore packages takes some time1. Sometimes, you might forget to type it. You can permanently ignore kernel upgrades by adding this to /etc/pacman.conf in the [options] section.