Linux Admin Quick Notes
Short admin snippets I keep needing just often enough to write down.
Extra drives in fstab
Use UUIDs in /etc/fstab so device names do not randomly ruin your day.
UUID=<UUID> <PATH> ext4 defaults 0 2
UUID=<UUID> <PATH> ext4 defaults 0 2
Get UUIDs with:
lsblk -f
GRUB os-prober
If GRUB is not finding another OS, enable os-prober in /etc/default/grub:
GRUB_DISABLE_OS_PROBER=false
Then regenerate the config:
sudo os-prober
sudo update-grub
Simple DNS fallback
If you find your laptop not connecting to the internet for some reason, then
check your DNS. Here are some fallbacks you can use in /etc/resolv.conf:
nameserver 1.1.1.1
nameserver 8.8.8.8
TLP power profiles
sudo tlp power-saver
sudo tlp balanced
sudo tlp performance
Brightness on startup
echo "brightnessctl set 100%" | sudo tee -a /etc/rc.local
Sudo password feedback
sudo visudo
Defaults:<USERNAME> pwfeedback
Remove :<USERNAME> if you want it for all users.
Vial udev rule
Vial needs a udev rule before it can talk to supported keyboards without extra permission drama.
export USER_GID=`id -g`; sudo --preserve-env=USER_GID sh -c 'echo "KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{serial}==\"*vial:f64c2b3c*\", MODE=\"0660\", GROUP=\"$USER_GID\", TAG+=\"uaccess\", TAG+=\"udev-acl\"" > /etc/udev/rules.d/59-vial.rules && udevadm control --reload && udevadm trigger'
Source: Vial Linux udev manual.
- ← Previous
Sync a Fork from Upstream - Next →
Editor and Terminal Quick Notes