Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues

Command-line shell -

From Void Linux Wiki
Jump to navigation Jump to search

From Wikipedia:

A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. Users direct the operation of the computer by entering commands as text for a command line interpreter to execute or by creating text scripts of one or more such commands.

List of shells

Void offers many shells, here is a list of some that are available.

  • Bash — Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification.
https://www.gnu.org/software/bash/ || bash
  • C shell — Command language interpreter usable both as an interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control and a C-like syntax.
http://www.tcsh.org || tcsh
  • DASH — POSIX-compliant implementation of /bin/sh that aims to be as small as possible. It does this without sacrificing speed where possible. In fact, it is significantly faster than Bash (the GNU Bourne-Again SHell) for most tasks.
http://gondor.apana.org.au/~herbert/dash/ || dash
  • elvish — Elvish is a cross-platform shell suitable for both interactive use and scripting. It features a full-fledged, non-POSIX-shell programming language and a fully programmable user interface.
https://github.com/elves/elvish || elvish
  • es — Es is an extensible shell. The language was derived from the Plan 9 shell, rc, and was influenced by functional programming languages, such as Scheme, and the Tcl embeddable programming language.
http://hawkwind.cs.toronto.edu:8001/mlists/es.html || es
  • fish — fish is a fully-equipped command line shell (like bash or zsh) that is smart and user-friendly. fish supports powerful features like syntax highlighting, autosuggestions, and tab completions that just work, with nothing to learn or configure.
https://fishshell.com || fish-shell
  • heirloom-sh — The Heirloom Bourne Shell is a portable variant of the traditional Unix shell. It has been derived from OpenSolaris code and thus implements the SVR4/SVID3 level of the shell
http://heirloom.sourceforge.net/sh.html || heirloom-sh
  • ion — Ion is a modern system shell that features a simple, yet powerful, syntax and is written entirely in Rust. It is developed alongside, and primarily for, RedoxOS, but is fully capable on other *nix platforms.
https://github.com/redox-os/ion || ion
  • ksh — ksh is the name of the program that implements the KornShell language, a complete, powerful, high-level programming language for writing applications
http://www.kornshell.com || ksh
  • loksh — loksh is a Linux port of OpenBSD's ksh. It is a small, interactive shell targeted at resource-constrained systems.
https://github.com/dimkr/loksh || loksh
  • mksh — An actively developed free implementation of the Korn Shell programming language and a successor to the Public Domain Korn Shell (pdksh)
https://www.mirbsd.org/mksh.htm || mksh
  • oksh — Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh)
https://github.com/ibara/oksh || oksh
  • posh — posh is a stripped-down version of pdksh that aims for compliance with Debian's policy, and few extra features.
https://packages.debian.org/sid/posh || posh
  • rc — Command interpreter for Plan 9 that provides similar facilities to UNIX’s Bourne shell, with some small additions and less idiosyncratic syntax.
http://plan9.bell-labs.com/sys/doc/rc.html || plan9port
  • Yash — Yash, yet another shell, is a POSIX-compliant command line shell written in C99 (ISO/IEC 9899:1999). Yash is intended to be the most POSIX-compliant shell in the world while supporting features for daily interactive and scripting use.
https://yash.osdn.jp/ || yash
  • Zsh — Shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of Bash, ksh, and tcsh were incorporated into Zsh; many original features were added. The introductory document details some of the unique features of Zsh.
http://www.zsh.org/ || zsh

Changing your default shell

After installing one the above shells, you can execute that shell inside of your current shell, by just running its executable. If you want to be served that shell when you login however, you will need to change your default shell.

To list all installed shells, run:

$ chsh -l

And to set one as default for your user (make sure you use the full path, as given by chsh -l):

$ chsh -s full-path-to-shell

If you now log out and log in again, you will be greeted by the other shell.