Post installation: Difference between revisions

From Alpine Linux
(blanked page as all content moved and added REDIRECT)
Tag: New redirect
 
(79 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Draft|This page "should" contain accurate and up to date information but is a work in progess}}
#REDIRECT [[Installation#Post-Installation]]
 
=== General Notes ===
<br>
 
* When '''#''' is displayed before a command that means the command needs to be run with root privileges,
 
* Anything in < > is likely just a placeholder that you need to replace (example: <editor> file.txt)
 
* Some information in here might be a repeat of information in other wiki pages, if you find a section where that is the case please add a link to the original wiki page.
 
<br>
 
== Creating a new user account ==
 
After installing Alpine by default you only get a root account. You will probably want to create an account that is not root,
 
{{cmd|# adduser <YourUsername>}}
replace <YourUsername> with the username of your choice
 
<br>
 
You will probably want to install '''doas''' so you can allow <YourUsername> to use root privileges
{{cmd|# apk add doas}}
 
<br>
 
If you want your user to be able to use root privileges add them to the Wheel group
{{cmd|# adduser <YourUsername> wheel}}
 
<br>
 
Allow members of the '''Wheel''' group to use root privileges with doas:
 
{{cmd|# <editor> /etc/doas.d/doas.conf}}
 
add this to a new line:
{{cmd|# permit persist :wheel}}
 
<br>
 
Switch to the new account type '''exit''' in the shell and login with the new user,
 
<br>
 
By default the permissions of your new user(s) home directory may be limited to the root account, run one of these commands to change that:
 
{{cmd|# chmod 700 /home/<YourUsername>}}
 
or
 
{{cmd|# chmod 777 /home/<YourUsername>}}
 
<br>
 
== Repositories ==
<br>
 
By default only the '''main''' repository is enabled, most users will probably want to enable the '''community''' repository, to enable a repository remove the '''#''' in front of the url along with any blank space.
 
<br>
 
(Example) Disabled:
{{cat|/etc/apk/repositories|#http://dl-cdn.alpinelinux.org/alpine/v3.15/main}}
 
(Example) Enabled:
{{cat|/etc/apk/repositories|http://dl-cdn.alpinelinux.org/alpine/v3.15/main}}
 
 
<br>
 
Open the repositories file in a text editor so you can edit them:
{{cmd|# <editor> /etc/apk/repositories}}
 
<br>
 
Example default configuration:
 
{{cat|/etc/apk/repositories|#/media/cdrom/apks
http://dl-cdn.alpinelinux.org/alpine/v3.15/main
# http://dl-cdn.alpinelinux.org/alpine/v3.15/community
#http://dl-cdn.alpinelinux.org/alpine/edge/main
#http://dl-cdn.alpinelinux.org/alpine/edge/community
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}
 
{{Note|The edge repositories contain unstable and/or possibly untested packages use at your own risk!}}
 
<br>
 
To avoid having to manually update the verison in '''/etc/apk/repositories''' for each Alpine Linux update, change '''v.3.15''' to '''latest-stable'''
 
Example:
{{cat|/etc/apk/repositories|#/media/cdrom/apks
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
#http://dl-cdn.alpinelinux.org/alpine/edge/main
#http://dl-cdn.alpinelinux.org/alpine/edge/community
#http://dl-cdn.alpinelinux.org/alpine/edge/testing}}
 
{{Note|Changing the repositories to latest-stable may initiate unexpected release upgrades, do this at your own risk!}}
 
<br>
 
For [https://en.wikipedia.org/wiki/HTTPS#Technical security reasons] it may be a good idea to change the url's from '''http''' to '''https'''
 
Example:
{{cat|/etc/apk/repositories|#/media/cdrom/apks
https://dl-cdn.alpinelinux.org/alpine/v3.15/main
https://dl-cdn.alpinelinux.org/alpine/v3.15/community
#https://dl-cdn.alpinelinux.org/alpine/edge/main
#https://dl-cdn.alpinelinux.org/alpine/edge/community
#https://dl-cdn.alpinelinux.org/alpine/edge/testing}}
 
{{Note|some Alpine Linux package mirrors may not support https, if that is the case you will need to revert back or change mirrors}}
 
<br>
 
Once you have edited '''/etc/apk/repositories''' sync the repositories with:
 
{{cmd|# apk update}}
 
<br>
 
== Installing a Display Server (for graphical sessions) ==
<br>
 
=== Installing Xorg ===
Most desktop enviroments (DE) or Windows Managers (WM) require Xorg (also called: X11, X), although in the future many will fully migrate to [[Wayland]] currently Xorg is still widely used,
 
<br>
 
There is two ways you can get Xorg installed,
 
<br>
 
By default Alpine Linux provides a script that will install Xorg, run the following command to install Xorg:
{{cmd|# setup-xorg-base}}
 
or
 
{{cmd|# apk add xorg-server xorg-server-common xorg-server-dev xorgproto xorgxrdp xorgxrdp-dev}}
{{Note| the apk add method is probably incomplete}}
 
<br>
 
== Installing a desktop environment or window manager ==
 
See: [[Desktop environments and Window managers]]
 
<br>

Latest revision as of 04:17, 29 May 2025