Difference between revisions of "Change default shell"

From Alpine Linux
Jump to: navigation, search
(Changing the default shell)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==== Changing the default shell ====
 
==== Changing the default shell ====
 
'''Download the required package:'''
 
 
<br>
 
<br>
''apk add libuser''
+
Download the required package: <br>''apk add libuser''
<br><br>
 
If you do not have files:
 
 
<br>
 
<br>
/etc/login.defs
+
If you do not have files: /etc/login.defs /etc/default/useradd
 
<br>
 
<br>
/etc/default/useradd
 
<br><br>
 
 
We will need to create them
 
We will need to create them
  
''touch /etc/login.defs''
+
* ''touch /etc/login.defs''
 +
* ''touch /etc/default/useradd''
 
<br>
 
<br>
''touch /etc/default/useradd''
 
<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: lchsh
''lchsh''
+
<br>
 
+
If you want to change a different user's shell: lchsh USERNAME
If you want to change a different user's shell:<br>
 
''lchsh USERNAME''
 

Latest revision as of 20:17, 25 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