Change default shell: Difference between revisions

From Alpine Linux
Line 8: Line 8:
* /etc/login.defs
* /etc/login.defs
* /etc/default/useradd
* /etc/default/useradd
<br><br>
 
We will need to create them
We will need to create them


Line 14: Line 14:
<br>
<br>
''touch /etc/default/useradd''
''touch /etc/default/useradd''
<br><br>
<br>
Now we can change our default shell
Now we can change our default shell
<br><br>
<br>
If you want to change the current user's shell:<br>
If you want to change the current user's shell:<br>
''lchsh''  
''lchsh''  

Revision as of 04:26, 24 October 2019

Changing the default shell

Download the required package:
apk add libuser

If you do not have files:

  • /etc/login.defs
  • /etc/default/useradd

We will need to create them

touch /etc/login.defs
touch /etc/default/useradd
Now we can change our default shell
If you want to change the current user's shell:
lchsh

If you want to change a different user's shell:
lchsh USERNAME