Linux maintainance

Mount drive to a shorter path

First, you need to list all drives and partition by the command:

lsblk

If you prefer to use GUI software, GParted might be a good choice.

Now you need to create a mount:

sudo mkdir /media/drive_e

Linux usually mounts a second drive to a long path (using UUID). Some software might pose an error because of this. You need to edit fstab:

sudo nano /etc/fstab

Add a line at the end (with comments starting by # if you want):

UUID=<uuid-of-your-drive> <mount-point> <file-system-type> <mount-options> <dump> <pass>

For example:

UUID=xxxxxxx-aaa-cccc-bbbbb-1234567 /media/Backup ext4 defaults 0 2

This time is for testing:

sudo mount -a

You need to reboot to make changes:

sudo reboot

Remove old kernel

Check the current version:

uname -r
rpm -q kernel-core

Remove a specific kernels:

sudo dnf remove kernel-core-<version>

To make sure it works properly, you should regenerate initramfs:

sudo dracut -f /boot/initramfs-$(uname -r).img $(uname -r)

Rsync to back up

Back up

sudo rsync -a --info=progress2 --exclude="lost+found" --exclude=".cache" /home/ /mnt/backup/

Restore. Test without changes using –dry-run

sudo rsync -a --dry-run --info=progress2 --exclude="lost+found" /home/ /mnt/backup/

restore

sudo rsync -a --info=progress2 --exclude="lost+found" /mnt/backup/ /home/

Force Qt to use X11 instead of Wayland

This solves the problem of running Qt applications on Wayland. [SAMSON OneAngstrom, Pegamoid.py]

export QT_QPA_PLATFORM=xcb

Colorful terminal SSH

TERM=xterm-256color

© Q. Dong Le 2018-2026 All Rights Reserved.