What Linux shell should I use? [closed]
The most common shell, by far, on Linux is bash. Unless you have a good reason to use an alternative, I'd suggest that sticking with bash, or the most commonly used shell by your project team (or that the bulk of the shell scripts you have to work with) uses.
The only other very common contender is dash, which is becoming more widely used by the Ubuntu project.
This really is personal preference, well, except for csh.
Wikipedia link for csh
I prefer zsh.
The tab-completion alone is worth it:
- It expands wildcards if you want(handy when you want to delete all but one file in a directory)
- Will give you a list of switches after specifying a program
- Gives tab completion options below the line you're working on, which is pretty handy.
http://zsh.sourceforge.net/
For interactivity, use Zsh. For a while I was the maintainer of the FreeBSD port of the Bash tab-completion scripts, but abandoned it as soon as I tried Zsh for the first time. It can do everything Bash can do but more easily and more elegantly. It also has the nice property of having extremely Bash-like keystrokes, so if you're on a system without Zsh, you'll be able to make do (even if it wouldn't "feel" as nice).
For scripting, use Bourne Shell (sh). It's the POSIX standard scripting language and your scripts are pretty much guaranteed to work everywhere. Bash and Zsh and other shells have nice extensions that you'll miss but those tie you to a specific setup. Ignore that advice for personal-use-only scripts that you're certain you'll never run elsewhere, but remember that it's a real tradeoff that you need to consider.
But in summary, Zsh. I don't know of anyone who's tried it who didn't immediately and permanently switch. It really is that good.