4 Ocak 2015 Pazar

Changing Default Shell On Linux

You can change the default shell by editing the file under /etc/passwd directory.
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
sinan:x:1000:1000:Sinan,,,:/home/sinan:/bin/sh
sh is used for sinan user in here. I prefer to change it to a much more useful shell called fish.
In order to make fish shell as default, we need to point the path to fish shell. On Kubuntu distribution, you can find fish on the /usr/bin/fish path. Last status of the file:
sinan:x:1000:1000:Sinan,,,:/home/sinan:/usr/bin/fish
Also, you can change the default shell with the chsh command.
chsh -s /usr/bin/fish sinan