Getting Started with Alpine Linux

You may of already heard of Alpine Linux, especially if you are familiar with Docker.

We use Alpine Linux as the operating system on our Docker hosts as well as in our containers. We do this because its light-weight, small and quick to get it going.

So lets show you how to setup Alpine Linux. I am going to assume you are doing this on a Virtual Machine. I am also going to assume you know how to create a Virtual Machine and how to mount an ISO.

Step 1 – Logging In

Fire up your virtual machine and you will be presented with a login prompt.
The username is root and there is no password.

Step 2 – Run the setup-alpine

Once you are in your console session, run the command setup-alpine.

Step 3 – Keyboard Configuration

Next, you need to enter your keyboard layout and varient in the next 2 questions. I am going to answer gb to both of these.

Step 4 – Network Setup

Next, you will need to enter your hostname, select your network interface, choose if you want to have a static or dhcp IP address and finally confirm if you want to make any manual changes. I am going to setup eth0 to be dhcp and I am not making any manual changes.

Step 5 – TimeZone Configuration

We now need to enter our password for the root account and setup our timezone. I am not going to tell you my root password, but I am going to set my timezone to be Europe/London.

Step 6 – Proxy

Next, you will now be prompted to enter a proxy address. You can leave the default of none if you do not have one.

Step 7 – NTP Client

Now we need to select which NTP client we want to use. I am going to stick with the default of chrony.

Step 8 – Repository Mirror

This will bring up a list of repository mirrors. You can either select one from the list, select a random one by answering r or selected the fastest one by answering f. I am going to answer f.

Step 9 – SSH Server

Next we are going to select an SSH server to use. You don’t have to have one. If you don’t want one you can enter none. Otherwise, your choices are either openssh or dropbear. I am going to use openssh.

Step 10 – Installing System

Now that we have answered all the questions Alpine needs, we can install the system to disk. To do this selected the disk you want to install the system to, in my case this is sda and then select what you want to install on it. If you want to install the system, use sys. You will be asked to confirm that the disk with be wiped.

Step 11 – Reboot and Enjoy

Once installed you can reboot and enjoy your new system. You can reboot by running the reboot command. Make sure you eject the ISO from you virtual machine before runnning the command.

Leave a Reply

Your email address will not be published. Required fields are marked *