Alpine Linux desktop setup requires technical know-how for lightning-fast performance
At a glance:
- Alpine Linux is a minimal, security-focused distribution popular for containers but can be adapted for desktop use
- Desktop setup requires technical knowledge including manual installation of KDE Plasma, bash, sudo, and NetworkManager
- The base image is extremely small (2.67-5 MB), making it fast but requiring significant configuration for desktop functionality
What is Alpine Linux?
Alpine Linux is a very minimal distribution, which translates to, "It doesn't ship with a desktop environment or a lot of apps/tools you're accustomed to." In fact, it doesn't ship with sudo or even bash. Consequently, it does take some work to make Alpine Linux a viable option for the desktop. But that doesn't preclude it from being an option, especially for those who value simplicity and security.
At the same time, getting Alpine Linux readied for desktop usage isn't exactly for the faint of heart. If you know what you're doing, you can have a solid desktop up and running in minutes. If you don't know what you're doing, it could take a while.
Is it time well spent? If you like a slight challenge and want to enjoy the end result of your efforts, the answer is yes. Alpine Linux as a desktop distribution is definitely worth the time spent. Let me show you what that time involves.
Installation process
The installation of Alpine Linux is a text-based affair, but it's not even remotely challenging (so long as you can answer a few simple questions).
The process includes the following:
- Create a bootable USB drive with the downloaded Alpine Linux ISO
- Boot the USB drive
- When prompted, log in as root (no password)
- Run the command setup-alpine
- Select your keyboard
- Set your hostname
- Set up the network connection (accept the default by hitting Enter on your keyboard)
- Set a root user password
- Set the time zone
- Select an Alpine mirror
- Set up a regular user account
- Choose your secure shell daemon
- Partition your disk (type sys for traditional hard-disk installation)
- The installation will complete in about a minute
- Reboot with the command: reboot
After it reboots, log in as the standard user you created during installation.
Setting up the KDE Plasma desktop
Before installing KDE Plasma, there are a few things to take care of. First, you'll need to enable the community repository. To do this, install the nano text editor with:
doas apk add nano
Once that completes, install bash and sudo with:
doas apk add bash bash-completion sudo shadow
Reboot again. Log back in as your standard user and then issue the command:
setup-desktop
Type plasma and hit Enter on your keyboard. This will walk through installing everything required for the KDE Plasma desktop.
When that completes, reboot again. After the reboot completes, you'll be greeted with the KDE Plasma login screen, where you can log in as your standard user and start using the desktop.
Performance and configuration considerations
The first thing you'll notice is how fast Alpine Linux performs. It's crazy fast. You might also notice that, even though you have a network connection, some apps don't recognize it. That's because the NetworkManager service isn't running. To start and enable that, issue the following commands:
doas rc-service networkmanager start
doas rc-update add networkmanager default
You should now be able to use everything as expected, even KDE Discover for installing applications (such as Flatpak). I would highly recommend installing Flatpak, so you have more options.
That's a lot of hoops to jump through, yes, but the hoops aren't all that challenging -- so long as you don't mind typing some commands. The end result is a lightning-fast desktop that can serve you very well.
Who should use Alpine Linux?
I would never recommend Alpine Linux as a desktop distribution for those with no Linux experience. But for those with even a modicum of familiarity with the open-source operating system, Alpine Linux could be a nice addition for personal use. On top of that, you'll learn a bit more about Linux along the way.
One last thing: Alpine Linux doesn't ship with a firewall (though when you install KDE Plasma, it adds a firewall GUI). You can install a firewall with a command like:
doas apk add ufw
Once you've installed the firewall, open the firewall GUI and enable it.
Have fun with Alpine Linux.
FAQ
Is Alpine Linux good for desktop use?
What makes Alpine Linux so fast?
Which desktop environments can be installed on Alpine Linux?
More in the feed
Prepared by the editorial stack from public data and external sources.
Original article