Change default shell: Difference between revisions

From Alpine Linux
(Formatting improvements)
m (Put the path to ash.)
Line 13: Line 13:
and press enter to confirm this change.
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.}}
{{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''' (/bin/ash) at anytime with the same steps.}}

Revision as of 02:12, 1 May 2022

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 (/bin/ash) at anytime with the same steps.