Skip to content

Instantly share code, notes, and snippets.

@c0m4r
Last active January 22, 2026 10:30
Show Gist options
  • Select an option

  • Save c0m4r/8b62e10f09038e738def504f67eaeac5 to your computer and use it in GitHub Desktop.

Select an option

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
@WiiAhmad
Copy link

Can u make tutorial for dualboot with windows and alpine? Cause i found some documentation but smhw its error, i still cant do it for dualboot

@c0m4r
Copy link
Author

c0m4r commented Jan 22, 2026

Hey @WiiAhmad

Well the only thing really you need to do for dualboot is to keep the Windows partition (or a drive if you have multiple drives) untouched and once you have Linux installed (any, not only Alpine) install grub on the drive that you boot your computer from (you can always change the boot sequence in BIOS).

It goes like this: PC power on -> BIOS sequence selects one physical drive for boot -> Boot loader (GRUB) is being read from the first sectors of the physical drive -> GRUB reads grub.cfg from a partition -> GRUB invoke a menu to select OS from OR loads the default one (depending on the GRUB_TIMEOUT).

You can list your drives under Linux with fdisk -l, let's say it's /dev/sda in case of HDD/SSD or /dev/nvme0n1 in case of nVME. Then installin the grub should be as simple as grub-install /dev/sda. In case of UEFI you might need to also install efibootmgr.

In case of Alpine, you don't get any tool to divide/split the existing space between two systems - you have to do it yourself if you only have one drive. If you have separate physical drives for Windows and Linux, this problem no longer concerns you.

For changing partition scheme it is best to use tools like cfdisk or gparted, I think the easiest way is to first run e.g. gparted ISO and repartition the drive with it OR you can install Ubuntu first which has this option in its installer and then replace Ubuntu with Alpine later on.

Once the GRUB is installed on a drive you boot from, simply re-generate grub configuration with grub-mkconfig -o /boot/grub/grub.cfg. There is a tool that is commonly installed with GRUB called os-prober - it... well, probes/scans for existing OSes, including Windows and adds them to the grub.cfg so you can switch between them on boot. If for some reason you don't see the GRUB menu while booting make sure that in /etc/default/grub you have:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5

and that it's not overridden by i.e. /etc/default/grub.d

In addition, you need to take into account different BIOS and UEFI configurations. If you have EFI and secure boot set in the BIOS, you must use the GPT partition table when partitioning both systems to avoid conflicts. In the case of Windows, however, encryption (bitlocker) may interfere. You can try disabling secure boot and installing the system in legacy mode or/and disabling bitlocker. You give up some security, but it may allow you to determine the cause of the problem, fix it, and then restore encryption. Personally I suggest using something other than bitlocker like veracrypt maybe? However, I haven't used Windows for a long time, so I don't know the current programs.

Good Luck!

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