Zsh

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to navigation Jump to search

The Z shell (zsh) is a UNIX / Linux command interpreter (shell) which is usable as an interactive login shell and as a shell script command processor. zsh most closely resembles ksh but includes many enhancements. Zsh has command line editing, builtin spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and a host of other features.

How do I install zsh under Linux?

If you are using CentOS / Redhat / Fedora Linux, open a terminal, then type:

yum install zsh

If you are using Debian / Ubuntu Linux, open a terminal, then type:

sudo apt-get install zsh

How do I use zsh?

Simply type the following command:

zsh

How do I set zsh as a login shell?

Simply type the following command[1]:

chsh -s /bin/zsh

Hello World Example

#!/bin/zsh
echo "Hello World!"

Author

  • Zsh was originally written by Paul Falstad.
  • Zsh is now maintained by the members of the zsh-workers mailing list.
  • The development is currently coordinated by Peter Stephenson.

See also

References

External links