Linux Cheat Sheet

Pacman 1 2 3 pacman-key --init pacman-key --populate pacman-key --refresh-keys Mounting drives Samba shares Install ‘cifs-utils’ for smb support Edit ‘/etc/credentials/samba/share’ 1 2 username=user password=pass Change permissions 1 2 3 chown root:root /etc/credentials chmod 700 /etc/credentials/samba chmod 600 /etc/credentials/samba/share Edit ‘/etc/fstab’ for mounting on boot 1 //<server>//<share> <mountpoint> cifs _netdev,nofail,credentials=/etc/credentials/samba/share,uid=user,gid=goup 0 0 Veracrypt drives Install ’ntfs-3g’ for ntfs partitions Edit ‘/etc/credentials/veracrypt/storage’ with your password Change permissions 1 2 3 chown root:root /etc/credentials chmod 700 /etc/credentials/veracrypt chmod 600 /etc/credentials/veracrypt/storage Edit ‘/etc/cryttab’ for decryption on boot...

March 16, 2024 · 1 min · 195 words · Holden

Encrypting Arch KVM on LUKS

This guide will set up an Arch Linux system with an encrypted partition using LUKS containing logical volumes for swap, root, and home using LVM. Below is an example of the disk layout: 1 2 3 4 5 6 7 8 9 10 11 +----------------++-----------------------------------------------------------------------+ | Boot partition || Logical volume 1 | Logical volume 2 | Logical volume 3 | | || | | | | /boot || [SWAP] | / | /home | | || | | | | || /dev/MyVolGroup/swap | /dev/MyVolGroup/root | /dev/MyVolGroup/home | | (may be on ||_ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _| | other device) || | | || LUKS2 encrypted partition | | /dev/sda1 || /dev/sda2 | +----------------++-----------------------------------------------------------------------+ Mount Point Partition Logical Volume Type File System Size /mnt/boot /dev/efi_system_partition none(not encrypted) EFI system partition fat32 1G [swap] /dev/swap_partition /dev/MyVolGroup/swap Linux swap swap 16G /mnt /dev/root_partition /dev/MyVolGroup/root Linux root btrfs 200G /mnt/home /dev/home_partition /dev/MyVolGroup/home Linux home btrfs Remainder 1....

March 16, 2024 · 2 min · 422 words · Holden

Arch Install Guide

This guide will install a base arch system with a encrypted root partition. 1. Format and Partition the disk Below is an example of the disk layout: Mount Point Partition Type File System Size /mnt/boot /dev/efi_system_partition EFI system partition fat32 1G [swap] /dev/swap_partition Linux swap swap 16G /mnt /dev/root_partition Linux root btrfs 200G /mnt/home /dev/home_partition Linux home btrfs Remainder 1.1. Create GPT partition table List the available drives and create the partition table:...

June 15, 2023 · 2 min · 315 words · Holden