Default system shell

Ubuntu Version:
24.04.1 LTS

Desktop Environment (if applicable):
GNOME

Problem Description:
Hello, according to an (older) Ubuntu wiki article, dash was made the default system shell. However, when I try /bin/sh and query echo $SHELL on my machine, the output is /bin/bash.

Has the default system shell since returned to bash? Perhaps I am misunderstanding how to find the default system shell?

I think it’s specified via /etc/default/useradd

The only thing listed there is the default login shell (in my case, /bin/sh); from what I understand, that is different from the default system shell.

I am under the impression that whatever is symlinked with /bin/sh is the default system shell, but I could be wrong. Actually upon checking ls -a /bin I see that is symlinked to /usr/bin, and in there sh is symlinked to dash.

I think my confusion is just about the environment variable $SHELL in a dash instance, then?

ls -l /bin/sh

Should show that dash is the system shell.

Bash is commonly used as the user login shell which you can check with echo $SHELL or perhaps better with grep "^$USER" /etc/passwd

3 Likes

Yep, per this answer, the $SHELL variable is not the currently running shell.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.