A few commands list

March 5, 2020 - Reading time: 3 minutes

A few commands listed in a single post because it is not worth having a separate post for each of them:

  • Rename (change label of) a disk:
sudo e2label /dev/sda2 "Manjaro"
  • List various error logs or similar:
systemctl list-unit-files --state=failed --no-pager
sudo systemctl --failed
sudo journalctl -p 3 -xb
  • Get the RAM info:
sudo dmidecode --type 17
  • Get screens info:
xrandr
  • List hardware:
lsusb
lspci
  • List network info:
ip address
  • Check current disk activity:
sudo iotop -o
  • Give user rights to renice (for GameMode):
sudo nano /etc/security/limits.conf

and add at the bottom of file:

omano            -       nice            -10
  • remove some stuff from boot:
sudo systemctl disable --now lvm2-monitor.service
sudo systemctl mask lvm2-monitor.service
sudo systemctl disable --now bluetooth.service
sudo systemctl mask bluetooth.service
pamac remove --no-save snapd
  • reinstall GRUB from live USB (chroot):
# we chroot
manjaro-chroot -a

# we reinstal  GRUB efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
# or GRUB mbr where /dev/sdy is the target
# grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy

# we update GRUB
grub-mkconfig -o /boot/grub/grub.cfg

# we exit chroot to unmount the system
exit

# we reboot
reboot