From Gentoo Wiki
Jump to: navigation, search
External resources

Zsh (Z shell) is an interactive login shell that can also be used as a powerful scripting language interpreter. It is similar to bash and the Korn shell, but offers extensive configurability, powerful commandline completion, file globbing, and spelling correction.


Install app-shells/zsh:

→ Information about USE flags
USE flag Default Recommended Description
caps No Use Linux capabilities library to control privilege
debug No No Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
doc No Adds extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
examples No Yes Install examples, usually source code
gdbm No Adds support for sys-libs/gdbm (GNU database libraries)
maildir No Adds support for maildir (~/.maildir) style mail spools
pcre No Adds support for Perl Compatible Regular Expressions
static No  !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically
unicode No Yes Adds support for Unicode
root # emerge --ask zsh

Also install app-shells/zsh-completion, which is optional, but enables auto-completion for arguments of commands, which is one of the strengths of Zsh:

root # emerge --ask zsh-completion
To enable 'zsh-completion' globally for every program, add it to your USE flags in /etc/portage/make.conf


Upon running Zsh for the first time as a new user, you will be greeted by a basic configuration dialog. You can skip this by pressing q to configure Zsh manually.

To make Zsh your default shell, you can run:

user $ chsh -s /bin/zsh

Zsh's main configuration file is ~/.zshrc and you can reload this configuration in a running shell with:

user $ source ~/.zshrc


Gentoo specific

External resources