Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So, I've been learning bash scripting, and I was doing research when I came across Ksh,Bourne Shell, Dash, and Zsh. I'm very confused and researching the matter made me more confused.
1. What exactly are Ksh,Bourne Shell, Dash, and Zsh?
2. Should I be learning these instead of regular bash scripting?
Bourne shell is the oldest of them.
Ksh is liitle recent than Bourne.
dash, zsh and Bash are more recent ones.
By default on most linux systems the GNU Bash is installed and used.
It's best to learn bash as many programs in linux use bash as shell scripting language.
Dash is a more posix conforming shell than bash. Bash has been replaced by dash as the /bin/sh shell in debian and ubuntu.
Zsh has more features than bash.
Bourne and Ksh are not used much in Linux.
veerain's answer is spot on and unless you're interested in historical accuracy or one of those people who need to know all, experience all, I personally would not bother with those other shells. They generally are all similar with subtle differences, some small, some large; but BASH is a good, best one to gain expertise on.
Similar to the C language. You can't go wrong by learning that and knowing it would help you with other languages which are very close extensions of that language. Same comment for BASH even though bash was not the first, but it still contains most, if not all, of the shell capabilities that you'll need.
In the commercial Unix world, there were 3 shells: sh, csh, and ksh.
Sh, or Bourne shell, is the original Unix shell. Most shells can run bourne shell scripts.
Csh, however, is a completely different animal. C shell is used on BSD oriented Unices. It has scripting constructs that resemble the C programming language.
Ksh, or Korn shell, introduced powerful things like command line editing using popular file editor keystrokes such as emacs or vi. Ksh was developed at Bell Labs as an experimental tool on AT&T Unix. The source code was not available in the public domain.
Bash is essentially the Linux implementation of ksh. It also has many technological improvements. But, basically, it's ksh without the ksh source code.
I've never used dash or zsh, so dunno for sure about those. I think they pre-dated bash. In the old days, everybody wanted ksh, but couldn't get it. Thus, people wrote shells that approached it or csh. IMHO, Bash exceeded ksh and is the best.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.