Daily driver guide: Difference between revisions

From Alpine Linux
m (→‎Sandboxing: Fix red link.)
(Refactored the page, adding links to other wiki pages)
Line 1: Line 1:
Many people think that Alpine is only made for containers and servers, but it is actually a general purpose distro which can definitely be used as a daily driver.
Many people think that Alpine is only made for containers and servers, but it is actually a general purpose distro which can definitely be used as a daily driver or as a Desktop.
Alpine is extremely small, simple and resource-efficient, making it easy to customize.
 
Alpine is extremely small, simple and resource-efficient, making it easy to customize.  


{{Note|This guide assumes you have already installed a minimal Alpine system by following the [[Installation|Installation guide]]}}
{{Note|This guide assumes you have already installed a minimal Alpine system by following the [[Installation|Installation guide]]}}
== Basics ==
* Create a non-privileged [[Setting_up_a_new_user#Creating_a_new_user|user account]] for security reasons.
* Ensure that <code>community</code> repository is [[Repositories#Managing_repositories|enabled]]
* [[Setup-desktop|Install]] a [[Desktop environments and Window managers|Desktop Environment]] of your choice.
* [[fonts#Installation|Install]] some [[fonts]].


== General system changes ==
== Advanced ==
=== Set up your own user ===
* Use [[Flatpak]] to add packages that are not in the Alpine [[Repositories#repositories|repositories]].
When running <code>setup-alpine</code> there was an option to create a user.
* Install {{pkg|gcompat|arch=}} package to add a glibc compatability layer which (sometimes) lets you run binaries as normal.
If you didn't make one, you can do it now:
* Secure your system by installing firewall software like [[How-To_Alpine_Wall|awall]] or [[Uncomplicated Firewall|UFW]].  
{{cmd|# adduser <username>}}
* Install a sandboxing application like [[AppArmor]] or [[Bubblewrap]].
 
Then, you need to give your user access to temporary root privileges:
{{cmd|# adduser <username> wheel}}
If you are using <code>doas</code> then it will most likely work instantly, if using <code>sudo</code> then you will need to follow the [[Setting_up_a_new_user#Creating_a_new_user|install instructions]]
 
=== Locking the root account ===
To lock the root account you need to log into your account and then lock it using the <code>passwd</code> command:
{{cmd|# passwd -l root}}
 
=== Glibc compatability ===
Installing the <code>gcompat</code> package adds a compatability layer which (sometimes) lets you run binaries as normal:
{{cmd|# apk add {{pkg|gcompat|arch=}}}}
 
Another way is to use [[Flatpak]]. It is a program distribution technology which uses a universal package format that is compatible with any Linux system.
 
== Install a Desktop Environment/Window Manager ==
The preferred way to install a Desktop Environment is by using the <code>setup-desktop</code> script:
{{cmd|# setup-desktop}}
If it does not have the Desktop Environment (or Window Manager) you want, [[Desktop environments and Window managers|follow the specific installation instructions for it]].
 
After installation you should probably install some fonts (because some fonts may not be installed).
This is a good set of fonts for most setups:
{{cmd|# apk add {{pkg|font-terminus|arch=}} {{pkg|font-inconsolata|arch=}} {{pkg|font-dejavu|arch=}} {{pkg|font-noto|arch=}} {{pkg|font-noto-cjk|arch=}} {{pkg|font-awesome|arch=}} {{pkg|font-noto-extra|arch=}}}}


== Securing your system ==
== Experimental ==
=== Firewall ===
There are two main options: [[How-To_Alpine_Wall|awall]] or [[Uncomplicated Firewall|UFW]].
Please follow their wiki guide for installation and usage.


=== Sandboxing ===
{{Warning|'''Only do below steps, if you're 100% sure what you're doing!''' Possible bugs in ''edge'' and ''testing'' could cause data loss or could break your system.}}
The two choices are either [[AppArmor]] or [[Bubblewrap]].


AppArmor is more convenient but has less control than Bubblewrap.
* If You may want the rolling release version of Alpine Linux, [[Repositories#Managing_repositories|enable]] the [[Repositories#Edge|Edge]] repository.  
Bubblewrap is harder to work with but has more control than AppArmor.
* You may want to [[Repositories#Managing_repositories|enable]] [[Repositories#Testing|testing]] repository, as it provides a lot more applications.  


Bubblewrap has a simpler GUI frontend called {{pkg|bubblejail|arch=}}. It is easier to use than Bubblewrap, but may sometimes be a little unstable.
Read the above warning once again and understand the full implications.
When installing Bubblejail, you first need to install the dependencies listed [https://github.com/igo95862/bubblejail/blob/master/docs/distro_notes/alpine.md here].

Revision as of 07:41, 13 August 2024

Many people think that Alpine is only made for containers and servers, but it is actually a general purpose distro which can definitely be used as a daily driver or as a Desktop.

Alpine is extremely small, simple and resource-efficient, making it easy to customize.

Note: This guide assumes you have already installed a minimal Alpine system by following the Installation guide

Basics

Advanced

  • Use Flatpak to add packages that are not in the Alpine repositories.
  • Install gcompat package to add a glibc compatability layer which (sometimes) lets you run binaries as normal.
  • Secure your system by installing firewall software like awall or UFW.
  • Install a sandboxing application like AppArmor or Bubblewrap.

Experimental

Warning: Only do below steps, if you're 100% sure what you're doing! Possible bugs in edge and testing could cause data loss or could break your system.


  • If You may want the rolling release version of Alpine Linux, enable the Edge repository.
  • You may want to enable testing repository, as it provides a lot more applications.

Read the above warning once again and understand the full implications.