Skip to contentSkip to conversation

Howto change the default shell in yocto?

DISCUSSION Oliver Graute 3 participants 5 messages Mar 4, 2016 – Mar 7, 2016

lore
Share & tools
lore
#0 lore raw

Hello,

how can I change the default shell on the yocto target from bash to another shell like dash?

is there a variable for local.conf? or do I need to adapt my passwd for every user?

Best Regards,

Oliver

#1 lore raw

The default *system* shell (/bin/sh) or the default shell for users, or for root? Folks often conflate them, but they're not the same.

Quoted 17 lines · Oliver Graute

Hello,

how can I change the default shell on the yocto target from bash to another shell like dash?

is there a variable for local.conf? or do I need to adapt my passwd for every user?

Best Regards,

Oliver
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#2 lore raw
Quoted 2 lines · Christopher Larson

The default *system* shell (/bin/sh) or the default shell for users, or for root? Folks often conflate them, but they're not the same.

first the default *system* shell (/bin/sh) is this possible? or does this affect to much of the yoco system itself, if I change /bin/sh to /bin/dash?

the alternative for me is to just change the default shell for normal users and the root user. I assume its done via /etc/passwd. But how I adapt these the yocto way?

Best regards,

Oliver

#3 lore raw
Quoted 4 lines · Oliver Graute

first the default *system* shell (/bin/sh) is this possible? or does this affect
to much of the yoco system itself, if I change /bin/sh to /bin/dash?

bash is only the default shell (ie symlink from /bin/sh) if you install it, so if you don't want bash to be sh then one option is to not install bash.

If you do want to keep bash installed but change the sh link, then that is managed with update-alternatives.

Ross

#4 lore raw
Quoted 7 lines · Ross
Quoted 4 lines · Oliver Graute

first the default *system* shell (/bin/sh) is this possible? or does this affect
to much of the yoco system itself, if I change /bin/sh to /bin/dash?

Quoted 7 lines

bash is only the default shell (ie symlink from /bin/sh) if you install it, so if you don't want bash to be sh then one option is to not install bash.

If you do want to keep bash installed but change the sh link, then that is managed with update-alternatives.

ok thx, if I do

update-alternatives --install /bin/sh sh /bin/dash 100

on the target it works.

Best Regards,

Oliver