Skip to content

Instantly share code, notes, and snippets.

@techie2000
Last active February 13, 2023 10:18
Show Gist options
  • Save techie2000/43047d0c9fcf6373afb0938132839824 to your computer and use it in GitHub Desktop.
Save techie2000/43047d0c9fcf6373afb0938132839824 to your computer and use it in GitHub Desktop.
Notes on Alpine Linux
To login to alpine Linux LXD vm from host use the lxc command:
lxc exec alpine-lxd-vm-name-here bash
Assumes you have bash installed on the VM - see install-bash.sh

One can change root shell to bash shell using the following method: vi /etc/passwd

Find user name and the default shell such as /bin/ash: root:x:0:0:root:/root:/bin/ash

Replace it with /bin/bash: root:x:0:0:root:/root:/bin/bash

Assumes you have bash installed on the VM - see install-bash.sh

apk update
apk upgrade
apk add bash
#apk add bash-doc
#apk add bash-completion

Alpine is:

  • systemd-free: it uses OpenRC instead.
  • Uses APK packages (instead of RPM or DEB).
  • Uses musl rather than GNU's glibc
  • Uses busybox rather than bash for its shell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment