Shell management: Difference between revisions
WhyNotHugo (talk | contribs) (Use a more realistic example of an interactive shell) |
Prabuanand (talk | contribs) m (Prabuanand moved page Change default shell to Shell management: to add more information on default shell and other available shells) |
(No difference)
|
Revision as of 03:47, 20 July 2025
Alpine Linux uses the BusyBox variant of the ash shell. This page explains various ways to change the default shell in Alpine Linux to other popular shells like bash, zsh, fish etc.. You can revert back to ash shell at anytime with the same steps.
By hand
Edit /etc/passwd manually. An example line for a user named user
is:
Contents of /etc/passwd
Change /bin/ash to point to the path of a shell from /etc/shells. Take care to not delete/mangle the line, as it would make you unable to log in again. The user
should be the user you are changing the default login shell for.
Using shadow
Download the required package:
# apk add shadow
And use chsh:
# chsh username
Now enter the path for the shell you want to use (e.g /bin/zsh) and press Enter to confirm this change. The shell should exist in /etc/shells.