Change default shell: Difference between revisions
m (make dir info missed) |
(Formatting improvements) |
||
Line 1: | Line 1: | ||
{{Note|By default Alpine Linux uses the [https://en.wikipedia.org/wiki/Almquist_shell ash] shell, but many users may prefer {{Pkg|bash}}, {{Pkg|zsh}}, {{Pkg|fish}} or another shell.}} | |||
Download the required package: | |||
{{Cmd|# apk add libuser}} | |||
Create: <code>/etc/login.defs</code> and <code>/etc/default/useradd</code>, if you don't have them: | |||
{{Cmd|# touch /etc/login.defs}} | |||
Now | {{Cmd|# mkdir /etc/default}} | ||
< | {{Cmd|# touch /etc/default/useradd}} | ||
Change current USER's shell: | |||
{{Cmd|# lchsh USER}} | |||
Now enter the path for the shell you want to use (e.g <code>/bin/bash</code>) | |||
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.}} |
Revision as of 09:42, 8 February 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 at anytime with the same steps.