Unix & Linux
shell ubuntu security freebsd users
Updated Sun, 26 Jun 2022 10:05:09 GMT

Why root's default shell is configured differently with other normal user account's default shell?

As I know, root's default shell is configured csh and normal user's default shell is sh in FreeBSD. And in Ubuntu, root is dash, normal user is bash. (refer: https://serverfault.com/questions/239535/whats-the-ubuntus-default-shell/239537#239537)

Why are they configured differently?


According to the FAQ:

In FreeBSD's case, the reason is that csh is the only shell "guaranteed" to be on the base filesystem (stuff from ports usually winds up in /usr/local/bin, which defaults to a different filesystem). This is important because you don't ever want there to be a situation where root can't log in because it's using a shell on a different (unmounted) filesystem.

Comments (2)

  • +1/bin/sh is guaranteed available too. But csh has better interactive features, plus it's become an accepted tradition. Other BSDs don't follow it; OpenBSD's root's shell is /bin/ksh (a pdksh derivative). — Feb 24, 2011 at 21:15  
  • +0 – @Gilles Right. I chose ksh as root's shell on my NetBSD VPS. I was just repeating the "official" explanation. Frankly, csh is a big reason I like having toor around: I much prefer bash or zsh myself. — Feb 24, 2011 at 21:43