Skip to content

Instantly share code, notes, and snippets.

@fcoury
Last active July 25, 2024 13:56
Show Gist options
  • Save fcoury/23e8fa748f37d7890fd5f5bf7df9085f to your computer and use it in GitHub Desktop.
Save fcoury/23e8fa748f37d7890fd5f5bf7df9085f to your computer and use it in GitHub Desktop.
Arch Linux on Mac M1/M2/M3 via UTM
loadkeys us-acentos
setfont Lat2-Terminus16
timedatectl
fdisk -l
fdisk /dev/vda
g
n
<default>
<enter>
+512M
t
uefi
n
<enter>
<enter>
+512M
t
<enter>
swap
n
<enter>
<enter>
<enter>
t
<enter>
linux
w
fdisk -l
mkfs.ext4 /dev/vda3
mkswap /dev/vda2
mkfs.fat -F 32 /dev/vda1
mount /dev/vda3 /mnt
mount --mkdir /dev/vda1 /mnt/boot
swapon /dev/vda2
pacstrap -K /mnt base base-devel linux linux-firmware e2fsprogs dhcpcd networkmanager vim neovim man-db man-pages texinfo
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
hwclock --systohc
vim /etc/locale.gen
comment out en_US*
locale-gen
vim /etc/locale.conf
add
LANG=en_US.UTF-8
vim /etc/vconsole.conf
add
KEYMAP=us-acentos
FONT=Lat2-Terminus16
vim /etc/hostname
add hostname
vim /etc/hosts
add
127.0.0.1 <tab> localhost
::1 <tab> localhost
127.0.0.1 <tab> <hostname>
mkinitcpio -P
passwd
change root password
pacman -S grub efibootmgr
you'll get an error here
vim /etc/pacman.conf
comment out:
SigLevel =...
add:
SigLevel = Never
pacman -S archlinuxarm-keyring
pacman-key --populate
vim /etc/pacman.conf
comment out:
SigLevel = Never
uncomment:
SigLevel = ...
pacman -S grub efibootmgr
grub-install --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
poweroff
--- unattach the CD-ROM from the vm, restart it, login as root
systemctl start NetworkManager
pacman -S neofetch
neofetch
pacman -Syu
pacman -S sudo
useradd -m -g users -G wheel,storage,power,audio fcoury
passwd fcoury
set your user password
EDITOR=vim visudo
comment out the line below ## Same thing without a password
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
su fcoury
sudo pacman -S xdg-user-dirs
xdg-user-dirs-update
sudo pacman -S git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
sudo pacman -S spice-vdagent
cd ~
sudo pacman -S pulseaudio alsa-utils alsa-plugins pavucontrol
sudo pacman -S openssh iw wpa_supplicant
sudo systemctl enable sshd
sudo systemctl enable dhcpcd
sudo systemctl enable NetworkManager
sudo pacman -S bluez bluez-utils blueman
sudo systemctl enable bluetooth
sudo vim /etc/pacman.conf
uncomment #Color
add ILoveCandy below it
sudo systemctl enable fstrim.timer
sudo pacman -S xorg-server sorg-apps xorg-xinit xclip
sudo pacman -S i3
cd ~
vim .xinitrc
exec i3
sudo pacman -S picom
sudo pacman -S noto-fonts
sudo pacman -Ssq nerd-fonts
choose fonts to install
sudo pacman -S zsh
sudo pacman -S alacritty ranger dmenu rofi polybar feh ueberzug wget
sudo pacman -S fd ripgrep htop
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment