3

I recently encountered that my /bin/sh is a symlink to dash, which is apparently default system shell for ubuntu since its 6.10 release.

I didn't know system shell is different from login shell. I can intuitively guess what the role of system shell should be, but I'm looking for more precise definition of what a system shell is and how does it differ from login shell.

3

A large number of shell instances are started as part of the Ubuntu boot process. Those are executed in system shell.

A login shell is the first process that executes under your user ID when you log in for an interactive session.

You get a login shell when you login and obtain a shell providing your user id and password in an interactive manner.

For example

  • [i] tty login using Ctrl+Alt+Fn (n=1 to 6, n=7 is the GUI)
  • [ii] ssh login etc.

When you login to X system you also get a login shell. A login shell reads /etc/profile and ~/.profile (in absence of ~/.bash_profile) if your default login shell is bash.


The default login shell is bash, it is not changed.

Bash is an excellent full-featured shell appropriate for interactive use. However, it is rather large and slow to start up and operate by comparison with dash.

To speed up the boot process the Ubuntu core development team changed the system shell, /bin/sh to dash.

  • So, system shell is something that ubuntu boot process uses to start all the process required to boot the OS? – aamir Apr 29 '14 at 18:06
  • the term system shell used in DashAsBinSh page precisely indicates that. – souravc Apr 29 '14 at 18:14
  • Good answer, but could clarify that the system shell is used for more than just boot processes. The system shell is also known as the command interpreter, is the shell installed as /bin/sh, is used to execute command strings given to functions like system(), and is almost universally used in the shebang line of shell scripts. This may include scripts executed during boot, but also many other shell scripts installed on a typical system. – Mike Miller Apr 29 '14 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.