Skip to content

Instantly share code, notes, and snippets.

@microraptor
Last active July 17, 2018 00:11
Show Gist options
  • Save microraptor/544e6f671daf25801eb87eb550c1759a to your computer and use it in GitHub Desktop.
Save microraptor/544e6f671daf25801eb87eb550c1759a to your computer and use it in GitHub Desktop.

Arch Install and Config Notes

About

This guide lists the steps for setting up Arch Linux in a multiboot with Windows and Ubuntu followed by the configuration of various Arch packages. To the majority this is a summary of numerous Arch-Wiki articles (wiki.archlinux.org).

Virtualbox is set up to boot the natively installed Windows within Arch, but it can also be booted from the bootloader, if you need to maximize system resources or have hardware issues. The Ubuntu installation is easy, quick and doesn't take up much space, because it is just another subvolume. It is always nice to have Ubuntu around as a redundant OS.

BTRFS is chosen as the file system of the single Linux partition, mainly because of these features:

  • Even if a RAID level with no redundancy or parity is chosen, scrub easily finds corruption, because all data is checksummed.
  • Instant atomic backups through snapshots with an easy rollback. They only start taking up disk space, if data is changed.
  • Incremental backups to other disks using the send and receive commands.
  • Arch and Ubuntu are installed on the same partition with subvolumes. Therefore, no free space is required on an extra Ubuntu partition.

There are a few subvolumes with mount points within the root volume which only hold non-essential data like caches. They are created only to exclude them from backups of the other subvolumes. If they make the setup too complex, they can be simply ignored. Because /var/log will be tried to be unmounted during shutdown while journald is still writing to it, there will be an error message. However, this can be ignored, because apparently the subvolume will be safely unmounted at the very end of the shutdown.

I recommend reading the corresponding Arch-Wiki articles and man pages for each section to make sure you always understand what exactly you are doing.

If you are not really interested in how the system works, don't want to spend much time informing yourself or are new to Linux, you will have a lot more fun with distributions like elementary OS, Linux Mint or Ubuntu. These distros are easily installed and ship preconfigured and optimized, where you can then customize the system gradually later. Even with them the Arch-Wiki is an excellent information resource. The difference is not as much, that Arch breaks all the time, just that there is more responsibility on the user's side to keep things running smoothly. For example the package manager is not as intrusive with automatic configurations. If you still want a more Arch like experience or have to have the AUR, Antergos and Manjaro are good options to hit the ground running.

Partitions

Disk size 512GB

  1. Label: Recovery
    • 500MB
  2. Partlabel: EFI system partition
    • Small size
    • VFAT
    • Linux Mount: /boot/efi
  3. Partlabel: Microsoft reserved partition
    • Small size
    • Unformatted and fragile
  4. Label: Windows
    • NTFS
    • 80GB
  5. Label: Butters
    • BTRFS
    • 350GB
    • Subvolumes and mount points:
      • @arch /
      • @pkg /var/cache/pacman/pkg
      • @abs /var/abs
      • @tmp /var/tmp
      • @log /var/log
      • @home /home
      • @cache /home/username/.cache
      • @thumb /home/username/.thumbnails
      • @data /media/data; Ubuntu: /media/data
      • @snapshots
      • @ubuntu /media/ubuntu; Ubuntu: /
      • @ubuntuhome /media/ubuntuhome; Ubuntu: /home
  6. Label: swap
    • swap
    • 16GB
  7. Over-provisioning
    • Samsung SSD: Not partitioned space at the end of the drive
    • 80GB

Windows

  • Create a Windows USB stick: https://www.microsoft.com/en-us/software-download/windows10
  • Install windows and leave unpartitioned space at the end of the disk
  • Disable fast boot in settings
  • Change time to linux standard (Admin CMD)
    reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
  • Set label of C: to "Windows"
  • Disable Cortana completely in registry
  • Configure Windows

Ubuntu

  • Install Ubuntu on a new Btrfs partition
  • Check new partition
    sudo btrfs device usage /
    # Change label:
    sudo btrfs filesystem label / Butters
    # Change profiles:
    sudo btrfs balance start -mconvert=dup -sconvert=dup --force /
    sudo btrfs device usage /
  • Add label swap to swap partition
  • Change subvolume names
    • Boot into a live system
      sudo mount -L Butters /mnt
      sudo btrfs subvolume list /mnt
      sudo mv /mnt/@ /mnt/@ubuntu
      sudo mv /mnt/@home /mnt/@ubuntuhome
      sudo btrfs subvolume list /mnt
      sudo nano /mnt/@ubuntu/etc/fstab
      # Change fstab entries accordingly
      sudo umount /mnt
    • Mount EFI partition and change "@" to "@ubuntu" in efi/ubuntu/grub.cfg
    • Reboot into Grub and press "e" to change boot options in the same way and boot
    • Run this to update Grub permanently to the new root subvolume:
      sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Configure Ubuntu

Arch Base

  • Create Arch subvolumes (can also be done in the Arch live system)
    sudo mkdir /media/butters
    sudo mount -L Butters /media/butters
    sudo subvolume create /media/butters/@arch
    sudo subvolume create /media/butters/@pkg
    sudo subvolume create /media/butters/@abs
    sudo subvolume create /media/butters/@tmp
    sudo subvolume create /media/butters/@log
    sudo subvolume create /media/butters/@home
    sudo subvolume create /media/butters/@cache
    sudo subvolume create /media/butters/@thumb
    sudo subvolume create /media/butters/@data
    sudo subvolume create /media/butters/@snapshots
    sudo btrfs subvolume list /media/butters
    sudo umount /media/butters
  • Download Arch iso and sig: https://www.archlinux.org/download/
  • Verify the download
    echo <sha1sum> archlinux-<version>-x86_64.iso | sha1sum -c
    gpg --keyserver pgp.mit.edu --keyserver-options auto-key-retrieve --verify archlinux-<version>-x86_64.iso.sig
  • Look for the USB stick device and flash the iso
    sudo lsblk
    sudo dd bs=4M if=archlinux-<version>-x86_64.iso of=/dev/<usb-stick-device> status=progress oflag=sync

  • Reboot into the Arch live system

  • Hint: Use Shift + Pict. Up/Down to scroll the terminal, tab for auto completion and the arrow keys for command history. If you want to quickly send non-sensible text between computers, you can use https://ptpb.pw/.

    The website: https://ptpb.pw/f

    In a terminal:

    # Get a paste
    curl -LsS https://ptpb.pw/xxx | dos2unix
    # Create a paste which is deleted after 10min
    curl -F sunset=600 -F c=@- https://ptpb.pw/
  • Change keyboard layout (Replace <> withsomething like de-latin1)

    ls /usr/share/kbd/keymaps/i386/**/
    loadkeys <KEYMAP>
  • If you want to increase the fontsize (because of a 4K display)

    setfont latarcyrheb-sun32
  • Set permanently keyboard map and font

    /etc/vconsole.conf

    KEYMAP=<KEYMAP>
    KEYMAP_TOGGLE=<ALTERNATIVE KEYMAP>
    FONT=latarcyrheb-sun32
    
  • Verify UEFI boot mode

    ls /sys/firmware/efi/efivars
  • Verify internet connection

    ping archlinux.org
  • Set system clock

    timedatectl set-ntp true
    timedatectl status
  • Enable swap

    swapon -L swap
  • Mount subvolumes

    lsblk -o +LABEL,PARTLABEL
    mount -L Butters -o subvol=@arch /mnt
    mkdir -p /mnt/boot/efi
    mount PARTLABEL="EFI system partition" /mnt/boot/efi
    btrfs subvolume list /mnt
    mkdir -p /mnt/var/cache/pacman/pkg
    mount -L Butters -o subvol=@pkg /mnt/var/cache/pacman/pkg
    mkdir /mnt/var/abs
    mount -L Butters -o subvol=@abs /mnt/var/abs
    mkdir /mnt/var/tmp
    mount -L Butters -o subvol=@tmp /mnt/var/tmp
    mkdir /mnt/var/log
    mount -L Butters -o subvol=@log /mnt/var/log
    mkdir /mnt/home
    mount -L Butters -o subvol=@thumb /mnt/home/<USERNAME>/.thumbnails
    findmnt
    btrfs subvolume list /mnt
    chmod -v 775 /mnt/var/log
  • Adjust /etc/pacman.d/mirrorlist

  • Install the base packages

    pacstrap /mnt base
  • Create fstab and adjust it

    genfstab -L /mnt >> /mnt/etc/fstab
    nano /mnt/etc/fstab

    /mnt/etc/fstab (The commented out options can be added later)

    LABEL="swap"    none                     swap  defaults 0 0
    LABEL="Butters" /                        btrfs subvol=@arch 0 0
    PARTLABEL="EFI system partition" /boot/efi   vfat  nosuid,nodev,noexec,errors=remount-ro 0 1
    
    LABEL="Butters" /var/cache/pacman/pkg    btrfs subvol=@pkg,nosuid,nodev 0 0
    LABEL="Butters" /var/abs                 btrfs subvol=@abs,nosuid,nodev 0 0
    LABEL="Butters" /var/tmp                 btrfs subvol=@tmp,nosuid,nodev 0 0
    LABEL="Butters" /var/log                 btrfs subvol=@log,nosuid,nodev 0 0
    LABEL="Butters" /home                    btrfs subvol=@home,nosuid,nodev 0 0
    #LABEL="Butters" /home/<user>/.cache      btrfs subvol=@cache,nosuid,nodev 0 0
    #LABEL="Butters" /home/<user>/.thumbnails btrfs subvol=@thumb,nosuid,nodev 0 0
    #LABEL="Butters" /.snapshots              btrfs subvol=@snapshots,nosuid,nodev,noexec,noatime 0 0
    #LABEL="Butters" /media/data              btrfs subvol=@data,nosuid,nodev,noexec,noatime,nofail,x-gvfs-show 0 0
    
    #LABEL="Butters" /media/ubuntu            btrfs subvol=@ubuntu,nosuid,nodev,noexec,noatime,nofail,noauto 0 0
    #LABEL="Butters" /media/ubuntuhome        btrfs subvol=@ubuntuhome,nosuid,nodev,noexec,noatime,nofail,noauto 0 0
    #tmpfs /media/ramdisk tmpfs nr_inodes=5k,noexec,nodev,nosuid,user,uid=user,gid=group,mode=1700,noauto,x-systemd.automount,x-gvfs-show 0 0
    #LABEL="Windows" /media/windows ntfs-3g nosuid,nodev,noexec,noatime,nofail,noauto,windows_names,locale=en_US.utf8,big_writes,uid=root,gid=users,dmask=022,fmask=133,errors=remount-ro 0 0
    
    # nas1 server
    #nas1:/c/home /media/nas1/home nfs noauto,user,_netdev,bg 0 0
    

  • Change root

    arch-chroot /mnt
  • Add custom directories

    mkdir -vp /media/data /media/ubuntu /media/ubuntuhome /media/ramdisk /media/windows
  • Set time (use tab to show regions and cities)

    tzselect
    ln -sf /usr/share/zoneinfo/<REGION>/<CITY> /etc/localtime
    hwclock --systohc
  • Uncomment en_US.UTF-8 UTF-8 and additional locales and generate locales

    nano /etc/locale.gen
    locale-gen

    /etc/locale.conf

    LANG=en_US.UTF-8
    
  • Set hostname and create hosts file (replace <>)

    /etc/hostname

    <HOSTNAME>
    

    /etc/hosts

    127.0.0.1 localhost
    ::1 localhost ip6-localhost ip6-loopback
    127.0.1.1 <HOSTNAME>.localdomain <HOSTNAME>
    
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
  • Set root password

    passwd
  • Install required packages (lsb-release for a better chance that Ubuntu's Grub will find Arch)

    pacman -S networkmanager lsb-release
  • We are about to use Ubuntu's bootloader to boot into Arch. If you don't have a Linux bootloader yet, install one now like rEFInd.

  • Exit chroot, unmount subvolumes and shutdown

    exit
    umount -R /mnt
    poweroff
  • Remove the USB stick


  • Boot into Ubuntu
  • Update Grub
    sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Verify it added a new Arch entry (otherwise manually create one)
    awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg
    Example of a manually created one in /etc/grub.d/40.custome
    menuentry 'Arch Static' {
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod btrfs
        if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root  <UUID>
        else
        search --no-floppy --fs-uuid --set=root <UUID>
        fi
            linux /@arch/boot/vmlinuz-linux root=UUID=<UUID> rootflags=subvol=@arch
        initrd /@arch/boot/initramfs-linux.img
    }
    

  • Reboot into the new Arch installation

  • Enable and start Network-Manager

    systemctl enable --now NetworkManager.service
    systemctl enable --now NetworkManager-wait-online.service
  • Check system

    # Verify time
    timedatectl
    # Enable NTP if neccessary:
    timedatectl set-ntp true
    # Verify locales
    locale -a
    localectl
    # Verify mounts
    findmnt
    # Verify hosts
    getent hosts
    # Verify internet
    ping archlinux.org
  • Uncomment Color in /etc/pacman.conf

  • Install basic packages (for an Intel CPU add intel-ucode)

    pacman -S --needed base networkmanager lsb-release base-devel coreutils ntfs-3g btrfs-progs ufw pam openssl devtools openssh git rsync sshfs gdisk net-tools curl wget screen
  • Enable firewall

    ufw default deny
    ufw enable
    systemctl enable --now ufw.service
    ufw status
    ufw show raw
    iptables -S | grep ACCEPT
  • Lock down SSH /etc/ssh/sshd_config

    ...
    AllowUsers none
    PermitRootLogin no
    ChallengeResponseAuthentication no
    PasswordAuthentication no
    UsePAM no
    ...
    
  • Set papersize

    echo a4 > /etc/papersize
  • Enviroment Variables: See customenv.sh

    printenv
  • Enable Periodic TRIM

    sudo lsblk --discard
    # DISC-GRAN DISC-MAX are non-zero -> trim supported
    systemctl enable --now fstrim.timer
  • Set journal size limit in /etc/systemd/journald.conf

    ...
    [Journal]
    SystemMaxUse=500M
    ...
    
  • Setup sudo

    nano /etc/sudoers.lecture
    # Write your sudo lecture
    sudo -ll
    sudo -lU <user>

    /usr/share/doc/sudo/examples/sudoers might be useful

    whereis systemctl poweroff
    visudo

    Uncomment the wheel group line, where a password is still needed.

    ...
    %wheel ALL=(ALL) ALL
    ...
    Defaults     insults
    Defaults     lecture = always
    Defaults     lecture_file = /etc/sudoers.lecture
    Cmnd_Alias POWER = /usr/bin/systemctl poweroff,/usr/bin/systemctl reboot,/usr/bin/poweroff,/usr/bin/reboot
    Cmnd_Alias NEXTBOOT = /usr/bin/efibootmgr -n 0,/usr/bin/efibootmgr -n 1
    Cmnd_Alias LECTURE = /etc/sudoer-lectures/set_random_lecture.sh
    Cmnd_Alias CPUFREQ = /usr/bin/cpufreq-set -c 0 -r -g performance,/usr/bin/cpufreq-set -c 0 -r -g ondemand
    <user> <hostname>=(root) NOPASSWD: POWER, NEXTBOOT, CPUFREQ, LECTURE
    
  • Create a user

    useradd --create-home <username>
    passwd <username>

    To add a group: groupadd -r <systemgroup>

    Add the new user to the groups: adm, games, rfkill, users, uucp, wheel, lock

    usermod -aG <groupname> <username>
  • Reboot and lock in as the new user


  • After it is absolutely sure that sudo works for the user you can disable root login

    sudo passwd -l root
  • Create user directories

    mkdir -vp ~/.cache ~/.thumbnails ~/bin ~/go/bin ~/go/src ~/.gem ~/.node_modules/bin ~/.wallpaper
  • If applicable uncomment/add the subvolume mounts for .cache and .thumnails in the home directory

    nano /etc/fstab
    mount -a
  • Install AUR-Helper https://github.com/Jguer/yay

    cd /tmp
    git clone https://aur.archlinux.org/yay.git
    cd yay
    makepkg -si
    yay -S yay
    yay --editmenu --save
    yay --devel --save
  • Configure git

    git config --global user.name  "<name>"
    git config --global user.email "<email>"
    git config --list
  • Change /etc/issue

    https://bbs.archlinux.org/viewtopic.php?id=50845

    nano mkissue.sh
    echo -e '\e[H\e[2J' > issue
    echo -e '                                                            \e[1;30m| \e[34m\\s \\r' >> issue
    echo -e '       \e[36;1m/\\\\                      \e[37m||     \e[36m| |                   \e[30m|' >> issue
    echo -e '      \e[36m/  \\\\                     \e[37m||     \e[36m|     _               \e[30m| \e[32m\\t' >> issue
    echo -e '     \e[1;36m/ \e[0;36m.. \e[1m\\\\   \e[37m//==\\\\\\\\ ||/= /==\\\\ ||/=\\\\  \e[36m| | |/ \\\\ |  | \\\\ /     \e[30m| \e[32m\\d' >> issue
    echo -e '    \e[0;36m/ .  . \\\\  \e[37m||  || ||   |    ||  || \e[36m| | |  | |  |  X      \e[1;30m|' >> issue
    echo -e '   \e[0;36m/  .  .  \\\\ \e[37m\\\\\\\\==/| ||   \\\\==/ ||  || \e[36m| | |  | \\\\_/| / \\\\     \e[1;30m| \e[31m\\U' >> issue
    echo -e '  \e[0;36m/ ..    .. \\\\   \e[0;37mA simple, lightweight linux distribution.  \e[1;30m|' >> issue
    echo -e ' \e[0;36m/_\x27        `_\\\\                                             \e[1;30m| \e[35m\\l \e[0mon \e[1;33m\\n' >> issue
    echo -e ' \e[0m' >> issue
    echo -e '' >> issue
    
    chmod -v +x mkissue.sh
    bash mkissue.sh
    cat /etc/issue
    sudo mv -iv /etc/issue /etc/issue.bak
    sudo cp -v issue /etc/issue
    cat /etc/issue
    sudo chmod -v +x /etc/issue
    rm -v mkissue.sh issue

Arch CLI

refind-efi

Install

Install refind with preloader for secure-boot (after installing the preloader-signed AUR package)

sudo refind-install --preloader /usr/share/preloader-signed/PreLoader.efi
sudo cp -fv /usr/share/refind/drivers_x64/{btrfs,ext4,iso9660}_x64.efi /boot/efi/EFI/refind/drivers_x64/
sudo cp -iv /usr/share/preloader-signed/HashTool.efi /boot/KernelHashTool.efi

Config

BTRFS Support:

/boot/efi/EFI/refind/refind.conf

...
also_scan_dirs boot,@arch/boot
...
extra_kernel_version_strings linux-zen,linux-lts,linux
...

The auto detected Arch options do not load intel-ucode. Assuming the packages intel-ucode, linux-lts and linux-zen are installed use this manual stanza (insert the PARTUUID and change Butters if you have a different volume label):

menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "Butters"
    loader   @arch/boot/vmlinuz-linux-zen
    initrd   @arch/boot/initramfs-linux-zen.img
    options  "root=PARTUUID=<PARTUUID> rootflags=subvol=@arch rw add_efi_memmap initrd=@arch/boot/intel-ucode.img"
    submenuentry "Boot to Terminal" {
        add_options "systemd.unit=multi-user.target"
    }
    submenuentry "Boot Vanilla Kernel" {
        loader @arch/boot/vmlinuz-linux
        initrd @arch/boot/initramfs-linux.img
    }
    submenuentry "Boot LTS Kernel" {
        loader @arch/boot/vmlinuz-linux-lts
        initrd @arch/boot/initramfs-linux-lts.img
    }
    submenuentry "Boot Vanilla using Fallback Initramfs" {
        loader @arch/boot/vmlinuz-linux
        initrd @arch/boot/initramfs-linux-fallback.img
    }
    submenuentry "Boot LTS using Fallback Initramfs" {
        loader @arch/boot/vmlinuz-linux-lts
        initrd @arch/boot/initramfs-linux-lts-fallback.img
    }
    enabled
}

To enable secure boot: In rEFInd use the hash tool of preloader to enroll the hashes of launcher.efi, all drivers and all the tools. Then use the other hash tool (was copied earlier to /boot/ and might be grouped with the Arch kernels) to enroll all kernels in /boot/. It seems chainloading Grub doesn't work under secure boot. Therefore, Ubuntu has to be selected in the UEFI bootmenu.

You can hide entries in rEFInd by pressing the delete key and see more boot options by pressing tab.

To check intel-ucode:

dmesg | grep microcode

If you mess the EFI entries up, make rEFInd default again:

sudo refind-mkdefault

Themes can be found here:

https://github.com/lukechilds/refind-ambience

https://gitlab.com/psfloyd/refind-ambience-black

https://github.com/EvanPurkhiser/rEFInd-minimal

https://github.com/munlik/refind-theme-regular

https://gitlab.com/nathanchere/rEFInd-classroom

Pacman Hook

Adjust the applicable tools in the last line /etc/pacman.d/hooks/refind.hook

[Trigger]
Operation=Upgrade
Type=Package
Target=refind-efi

[Action]
Description = Updating rEFInd on ESP with preloader
When=PostTransaction
Exec=/usr/bin/refind-install --preloader /usr/share/preloader-signed/PreLoader.efi && sudo cp -fv /usr/share/refind/drivers_x64/{btrfs,ext4,iso9660}_x64.efi /boot/efi/EFI/refind/drivers_x64/ && sudo cp -fv /usr/share/preloader-signed/HashTool.efi /boot/KernelHashTool.efi && cp -fv /usr/share/uefi-shell/shellx64_v2.efi /boot/efi/EFI/tools/shellx64.efi

uefi-shell-git (AUR)

sudo mkdir -v /boot/efi/EFI/tools
sudo cp -iv /usr/share/uefi-shell/shellx64_v2.efi /boot/efi/EFI/tools/shellx64.efi

memtest86-efi (AUR)

The AUR package ships with a install script and pacman hooks:

sudo memtest86-efi --install
# Choose the new EFI boot entry or rEFInd option (2 or 5)

fwupd

sudo mkdir /boot/efi/EFI/tools
sudo cp -iv /usr/lib/fwupdate/EFI/arch/*.efi /boot/efi/EFI/tools/
sudo cp -iv /usr/share/doc/fwupdate/esp-as-boot-efi.hook /etc/pacman.d/hooks/fwupdate-efi-copy.hook
sudo nano /etc/pacman.d/hooks/fwupdate-efi-copy.hook

Edit the Exec line to:

Exec = /usr/bin/cp /usr/lib/fwupdate/EFI/arch/*.efi /boot/efi/EFI/tools/

pacman

Install the wget and pacman-contrib packages.

/etc/pacman.conf

...
Color
...
XferCommand = /usr/bin/wget -c -q --show-progress --passive-ftp -O %o %u
...

Enable the paccache timer:

sudo systemctl enable --now paccache.timer

Update Mirrorlist

Get mirrors at https://www.archlinux.org/mirrorlist/ and use rankmirror to rank them by speed. Example:

sudo cp -iv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
curl -s "https://www.archlinux.org/mirrorlist/?country=DE&protocol=https&ip_version=6&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 10 - | sudo tee /etc/pacman.d/mirrorlist
# Force update package lists and upgrade
sudo pacman -Syyu

nano

After installing the AUR package nano-syntax-highlighting-git add them to the config /etc/nanorc

...
include /usr/share/nano-syntax-highlighting/*.nanorc"
...

Locales

locale -a
sudo nano /etc/locale.gen
sudo locale-gen
sudo localectl set-locale LANG=en_US.UTF-8
locale -a

fish

See my custom fish_update_abbr.fish file.

fish_update_completions
# Disable greeting in fish
set -U fish_greeting

To start fish in an interactive shell automatically add exec fish at the end of ~/.bashrc.

Install https://github.com/oh-my-fish/oh-my-fish:

curl -L https://get.oh-my.fish | sha256sum
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256
curl -L https://get.oh-my.fish | fish
# To check health
omf doctor

pkgfile

Enable the update timer:

sudo systemctl enable --now pkgfile-update.timer

Works with Fish-Shell out of the box.

For Bash add this line at the end of ~/.bashrc:

source /usr/share/doc/pkgfile/command-not-found.bash

vnstat

sudo systemctl enable --now vnstat.service
vnstat --iflist
sudo nano /etc/vnstat.conf
# Edit default device
sudo vnstat -u
# To query:
vnstat -q
# To see live:
vnstat -l

clamav

Enable automatic update of database:

sudo freshclam
sudo systemctl enable --now clamav-freshclam.service

The following test should find the EICAR test siganture:

curl https://www.eicar.org/download/eicar.com.txt | clamscan -

Enable extra unofficial signatures from the AUR package clamav-unofficial-sigs

See this guide for free signups: https://github.com/extremeshok/clamav-unofficial-sigs

sudo nano /etc/clamav-unofficial-sigs/user.conf
# See Github guide for edits
# You can laso set up securiteinfo DBs directly in freshclam.conf
sudo clamav-unofficial-sigs.sh
# Might take 10min for downloads
sudo systemctl enable --now clamav-unofficial-sigs.timer

Check loaded clamav signatures:

clamscan --debug 2>&1 /dev/null | grep loaded

crda

Check if loaded:

dmesg | grep cfg80211

Check regdomain settings:

iw reg get
iw list | grep -A 15 Frequencies:
dmesg | grep <WIFI-INTERFACE>

It may help to search for "EEPROM", "regdomain", or simply the name of the device driver.

Set current regdomain:

iw reg set <regdomain>

For permanent settings edit /etc/conf.d/wireless-regdom and for wpa-supplicant edit the country= line of /etc/wpa_supplicant/wpa_supplicant.conf.

lm_sensors

One-time setup:

sudo sensors-detect --auto

To see curent data:

sensors

Self Encrypting Drive

If you SSD supports SED, you can enable it in the UEFI setup menu or by following the instructions here: https://github.com/Drive-Trust-Alliance/sedutil/wiki/Encrypting-your-drive After correctly set up, your computer will first boot into the PBA and ask for a password to unlock the drive. Then the computer will restart and boot the unlocked SSD. The drive will lock when using power, as after a shutdown, but will stay unlocked during sleep and a restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment