To Dash or to Bash

For this project I am trying it needs Bash not Dash.

When
dpkg-reconfigure dash to set bash
The terminal gives a warning

  1. how serious is it to move to Bash
  2. Is there a way to limit Bash to only one particular user rather than glabally?

Thank you

1 Like

The initial shell is set on a per-user basis (in the /etc/passwd file, and set with the chsh command). So straight off you can specify that one user will use bash while another will use dash, if that’s what you want.

Regardless, most of the time if you are in one shell and you want a different shell, just type the name of the shell that you want - provided that the latter is installed of course.

Every shell script should specify the shell that it wants in its first line. So provided that the desired shell is installed, shell scripts should work regardless of what shell you are using.

I think dpkg-reconfigure will generally be global i.e. could be disruptive to your system.

What was the “warning” message?

Hi @kieran
Excellent answer. Thank you.

Here’s the warning

OK, that’s not a warning. That’s just getting confirmation.

On my system

ls -l /bin/sh
gives
/bin/sh -> dash

So just check where /bin/sh links to before you start messing with things in case you want (need) to revert.

linux-from-scratch ! nice !

not exactly what you asked about but maybe a cool project you’ve not heard about yet > https://lbry.tv/@DistroTube:2/bashtop-is-an-htop-alternative-written:e

bashtop is very cool eye candy, but it uses 10-20 times the CPU of htop.

2 Likes