Skip to content

Instantly share code, notes, and snippets.

@c0m4r
Last active February 4, 2024 05:28
Show Gist options
  • Save c0m4r/8b62e10f09038e738def504f67eaeac5 to your computer and use it in GitHub Desktop.
Save c0m4r/8b62e10f09038e738def504f67eaeac5 to your computer and use it in GitHub Desktop.
Alpine 3.19 desktop setup

Alpine 3.19 desktop setup

Install Alpine

  1. Get Standard ISO from https://alpinelinux.org/downloads/
  2. Boot the ISO and log in as root (no password required).
  3. Run setup-alpine and install using defaults. For partition layout use sys or lvmsys.

Desktop Setup

On a fresh boot of newly installed system

Set up DNS and repositories

echo "nameserver 9.9.9.9" > /etc/resolv.conf 
echo "nameserver 149.112.112.112" >> /etc/resolv.conf
sed -i 's/#http/http/g;' /etc/apk/repositories
grep -v '#/media/cdrom/apks' /etc/apk/repositories > /etc/apk/repositories.tmp
mv /etc/apk/repositories.tmp /etc/apk/repositories
apk update
apk upgrade

Install useful tools

apk add bash bash-completion chrony curl grep htop iproute2 lsof nano ncdu neofetch mc mtr openvpn p7zip procps rsync tcpdump vim wget whois xz
apk add abuild binutils ccache coreutils findutils gcompat hwdata-pci hwdata-usb linux-headers util-linux util-linux-misc pciutils usbutils shadow
apk add autoconf automake bison build-base cargo cmake flex libtool m4 patch pkgconfig
usermod -s /bin/bash root

Deploy Xorg, drivers and required tools

setup-xorg-base
apk add xf86-video-vesa xf86-video-intel xf86-video-nouveau xf86-video-amdgpu
apk add dbus elogind polkit-elogind
rc-update add chronyd
rc-update add dbus
rc-update add elogind
rc-update add polkit
rc-service chronyd start
rc-service dbus start
rc-service elogind start
rc-service polkit start
apk add kbd xf86-input-synaptics xf86-input-libinput
apk add plasma

Install KDE and custom applications

apk add kde-applications
apk add audacity chromium docker docker-cli-compose gedit gimp flatpak font-adobe-source-code-pro keepassxc terminator
rc-update add docker
rc-update add sddm
setup-devd udev

Configure user

export INSTALL_USER="c0m4r"
useradd -m -d /home/${INSTALL_USER} -s /bin/bash ${INSTALL_USER}
usermod -a -G wheel ${INSTALL_USER}
echo ". /etc/profile" > /home/${INSTALL_USER}/.bashrc
echo "alias ls='ls --color'" >> /home/${INSTALL_USER}/.bashrc
echo "alias grep='grep --color'" >> /home/${INSTALL_USER}/.bashrc
chown ${INSTALL_USER}:${INSTALL_USER} /home/${INSTALL_USER}/.bashrc
passwd ${INSTALL_USER}

Sudo configuration

Uncomment sudo configuration for the wheel group

sudo visudo

Reboot

That's all, everything should be up and running after reboot

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