Difference between revisions of "Other standard shells"

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to navigation Jump to search
Line 38: Line 38:
 
which gcc
 
which gcc
 
which vi</source>
 
which vi</source>
[[Category:Introduction to Shells]]
+
[[Category:Introduction to Shells]][[Category:Commands]]
 +
 
 +
{{navigation
 +
|previous=The role of shells in the Linux environment
 +
|next=Hello, World! Tutorial|Write a simple shell script - "Hello World!"}}

Revision as of 09:24, 25 September 2009

← The role of shells in the Linux environmentHomeHello, World! Tutorial →

In Linux, a lot of work is done using a command line shell. Linux comes preinstalled with Bash. Many other shells are available under Linux:

  • tcsh - An enhanced version of csh, the C shell.
  • ksh - The real, AT&T version of the Korn shell.
  • csh - Shell with C-like syntax, standard login shell on BSD systems.
  • zsh - A powerful interactive shell.
  • scsh- An open-source Unix shell embedded within Scheme programming language.

Find out available binary packages shell list

To find the list of available shell packages under Red Hat Enterprise Linux / CentOS Linux / Fedora Linux, enter:

yum search shell

To find the list of available shell packages under Debian Linux / Ubuntu Linux, enter:

apt-cache search shell

Pathnames of valid login shells

/etc/shells is a text file which contains the full pathnames of valid login shells. This file is consulted by chsh and available to be queried by other programs such as ftp servers.

cat /etc/shells

Sample outputs:

/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/zsh
/bin/ksh

which command

You can also use the which command to display the full path of (shell) commands:

which commandname
which bash

Sample outputs:

/bin/bash

For each of its command line arguments it prints to stdout (screen) the full path of the executables that would have been executed when this argument had been entered at the shell prompt:

which date
which gcc
which vi

← The role of shells in the Linux environmentHomeHello, World! Tutorial →