Daily driver guide: Difference between revisions

From Alpine Linux
(A guide for using Alpine as a daily driver)
 
mNo edit summary
Line 6: Line 6:
== General system changes ==
== General system changes ==
=== Set up your own user ===
=== Set up your own user ===
When running `setup-alpine` there was an option to create a user.
When running <code>setup-alpine</code> there was an option to create a user.
If you didn't make one, you can do it now:
If you didn't make one, you can do it now:
{{cmd|# adduser <username>}}
{{cmd|# adduser <username>}}
Line 12: Line 12:
Then, you need to give your user access to temporary root privileges:
Then, you need to give your user access to temporary root privileges:
{{cmd|# adduser <username> wheel}}
{{cmd|# adduser <username> wheel}}
If you are using `doas` then it will most likely work instantly, if using `sudo` then you will need to follow the [https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user#Creating_a_new_user install instructions]
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 [https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user#Creating_a_new_user install instructions]


=== Locking the root account ===
=== Locking the root account ===
To lock the root account you need to log into your account and then lock it using the passwd command:
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}}
{{cmd|# passwd -l root}}


=== Glibc compatability ===
=== Glibc compatability ===
Installing the `gcompat` package adds a compatability layer which (sometimes) lets you run binaries as normal:
Installing the <code>gcompat</code> package adds a compatability layer which (sometimes) lets you run binaries as normal:
{{cmd|# apk add gcompat}}
{{cmd|# apk add gcompat}}


Line 25: Line 25:


== Install a Desktop Environment/Window Manager ==
== Install a Desktop Environment/Window Manager ==
The preferred way to install a Desktop Environment is by using the setup script:
The preferred way to install a Desktop Environment is by using the <code>setup-desktop</code> script:
{{cmd|# setup-desktop}}
{{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]].
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]].
Line 31: Line 31:
After installation you should probably install some fonts (because some fonts may not be installed).
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:
This is a good set of fonts for most setups:
{{cmd|# apk add font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra}
{{cmd|# apk add font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra}}


== Securing your system ==
== Securing your system ==

Revision as of 18:41, 30 March 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. 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

General system changes

Set up your own user

When running setup-alpine there was an option to create a user. If you didn't make one, you can do it now:

# adduser <username>

Then, you need to give your user access to temporary root privileges:

# adduser <username> wheel

If you are using doas then it will most likely work instantly, if using sudo then you will need to follow the install instructions

Locking the root account

To lock the root account you need to log into your account and then lock it using the passwd command:

# passwd -l root

Glibc compatability

Installing the gcompat package adds a compatability layer which (sometimes) lets you run binaries as normal:

# apk add gcompat

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 setup-desktop script:

# setup-desktop

If it does not have the Desktop Environment (or Window Manager) you want, 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:

# apk add font-terminus font-inconsolata font-dejavu font-noto font-noto-cjk font-awesome font-noto-extra

Securing your system

Firewall

There are two main options: awall or UFW. Please follow their wiki guide for installation and usage.

Sandboxing

The two choices are either AppArmor or Bubblewrap.

AppArmor is more convenient but has less control than Bubblewrap. Bubblewrap is harder to work with but has more control than AppArmor.

Bubblewrap has a simpler GUI frontend called Bubblejail. It is easier to use than Bubblewrap, but may sometimes be a little unstable. When installing Bubblejail, you first need to install the dependencies listed here.