Skip to content

Shell

The default shell on Obarun is zsh, not bash. The obarun-zsh package provides the configuration that makes it usable out of the box.

What the package ships

File Role
/etc/skel/.zshrc The configuration new accounts get
/etc/skel/.zshenv The environment new accounts get
/etc/.zshrc, /etc/.zshenv The same, for accounts whose home has no copy

New users created with useradd -m receive the /etc/skel copies automatically. If you end up in a zsh with no configuration, and zsh greets you with its first-run questionnaire, you can escape it by copying the templates:

$ cp /etc/skel/.zshrc /etc/skel/.zshenv ~/

What the configuration does

.zshenv sets the search path:

typeset -U path
path=(/usr/bin /bin /usr/local/bin /opt /usr/share/man $path)

.zshrc sets up, among other things:

  • History: ~/.zsh_history, 10000 entries, with hist_ignore_dups and hist_ignore_space so duplicates and space-prefixed commands stay out of it.
  • A drop-in directory, ~/.config/zsh.d, for your own additions. Put your changes there rather than editing the shipped file, so an upgrade does not overwrite them.
  • Completion, with case-insensitive matching, a menu selection, a cache, and rehash so newly installed commands are found without restarting the shell.
  • Colour for ls, grep, egrep, and diff when colordiff is installed.
  • zmv for pattern based renaming, and zargs.
  • edit-command-line, which opens the current line in $EDITOR. Useful when you are writing a function at the prompt.
  • Aliases, including interactive and verbose cp, mv, rm, ln, and alias 66='66 -z' so 66 output is colourised by default.
  • EDITOR defaults to /usr/bin/mcedit.

Read the file itself, it is commented, and it is the authority on what your system actually does:

$ more ~/.zshrc

Using bash instead

Nothing forces zsh on you. Install bash, and change the shell for your account:

$ chsh -s /bin/bash

Obarun does not depend on zsh being your login shell.