The collection of commands that I will use, and may be useful to whoever needs.

Linux

Mostly use Arch Linux, but you can also adjust it for your system.

Grub

Install

grub-install --target=x86_64-efi --efi-directory=/boot --recheck

Detect other boot

paru -S os-prober
sudo os-prober
 
sudo nvim /etc/default/grub
 
# Ctrl+End (to go to the last line), then uncomment this part
#GRUB_DISABLE_OS_PROBER=false
 
sudo grub-mkconfig -o /boot/grub/grub.cfg

Data partition

Yes, I can seperate my /home partition for media, but I need an seamless and simplest way to keep my medias automatically available in both my Windows and Linux. This is just works™️.

I use /data as the mount point.

paru -S ntfs-3g
 
# Check desired partition UUID
lsblk -f
 
sudo nvim /etc/fstab
 
# Add this line at the bottom of file
UUID=1A2B3C4D5E6F /data ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0
 
sudo mount -a

Symlink directories

# Delete the current /home directories
rm -r ~/Documents ~/Downloads ~/Videos ~/Pictures ~/Music ~/Public ~/Templates
 
ln -sfn /data/Documents ~/Documents
ln -sfn /data/Downloads ~/Downloads
ln -sfn /data/Videos ~/Videos
ln -sfn /data/Pictures ~/Pictures
ln -sfn /data/Music ~/Music
ln -sfn /data/Public ~/Public
ln -sfn /data/Templates ~/Templates

Generate SSH key for git

ssh-keygen -t ed25519 -C "email@example.com"
cat ~/.ssh/id_ed25519.pub

Git config

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Set default browser

# Change firefox to desired browser
 
ls /usr/share/applications/ | grep firefox
xdg-settings set default-web-browser firefox.desktop
xdg-settings get default-web-browser

Install extra fonts

paru -S noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra
 
# If you want Microsoft Office fonts
paru -S ttf-ms-fonts ttf-vista-fonts
 
fc-cache -fv

HP printer drivers

paru -S python-pyqt5 dbus python-pillow python-reportlab cups hplip
sudo systemctl enable --now cups
hp-setup
hp-info -i

GNOME basic utilities

Works great in most compositor.

paru -S gnome-text-editor gnome-music nautilus loupe showtime gnome-calendar

Android USB compatibility

paru -S usbutils android-tools android-udev libmtp gvfs-mtp

Install wine

paru -S wine wine-mono wine-gecko
wine --version
wine winecfg

Install qemu

lsmod | grep kvm
# If "kvm" doesn't appears, you should enable hardware virtualization in your BIOS settings.
 
paru -S qemu-full qemu-img libvirt virt-install virt-manager virt-viewer edk2-ovmf swtpm guestfs-tools libosinfo tuned dnsmasq bridge-utils
 
sudo systemctl enable --now libvirtd.service
sudo systemctl enable --now tuned.service
 
sudo tuned-adm profile virtual-host
sudo virsh net-list --all
sudo virsh net-start default
sudo virsh net-autostart default
sudo usermod -aG libvirt $(whoami)

Syncthing

paru -S syncthing
sudo systemctl enable --now syncthing@$USER

Local music

paru -S qt5-wayland picard nicotine+

Sober (+max fps)

flatpak install flathub org.vinegarhq.Sober
sudo nvim ~/.var/app/org.vinegarhq.Sober/config/sober/config.json
 
"fflags": {
      "DFIntTaskSchedulerTargetFps": "999",
      "FFlagExample": true,
      "FIntTargetRefreshRate": "1000"
},

Softwares

paru -S
  • flatpak

  • librewolf-bin
    Check “Enable Firefox sync”
    Uncheck “Enable ResistFingerprinting”

  • libreoffice-still
    Use libreoffice-fresh to the latest features

There’s also some another in my Dotfiles install script, like paru, oh-my-posh, ble.sh.

Windows

Fix wifi

netsh int ip reset
netsh winsock reset
ipconfig /flushdns
 
# Check the wifi interface
netsh wlan show interfaces

Backup driver

Change the directory “D:\BackupDriver” into your desired location. The folder should be created.

dism /online /export-driver /destination:"D:\BackupDriver"
pnputil /add-driver "D:\BackupDriver\*.inf" /subdirs /install