Change default shell
Note: By default Alpine Linux uses the ash shell, but many users may prefer bash, zsh, fish or another shell.
Download the required package:
# apk add libuser
Create: /etc/login.defs
and /etc/default/useradd
, if you don't have them:
# touch /etc/login.defs
# mkdir /etc/default
# touch /etc/default/useradd
Change current USER's shell:
# lchsh USER
Now enter the path for the shell you want to use (e.g /bin/bash
)
and press enter to confirm this change.
Note: You may need to log out or reboot for this change to take effect, ash is part of busybox so you can revert back to ash at anytime with the same steps.