What Are Linux / UNIX Shells?

Can you explain me UNIX shell? What are Shells?

A shell is nothing but the interface between UNIX / Linux and the user (i.e. you).


The shell phrases commands (the text you type) and send those to UNIX / Linux / BSD operating system to take an appropriate action.

For e.g. to see current date you type the command:
$ date
You shell will interpret the date command and sends request to operating system. Operating system will read actual date and display back on screen. A shell can be defined as follows:

A Unix shell is a command-line interpreter that provides a traditional user interface for the Unix / Linux / BSD operating systems.

A lot of everyday work is done in a command line using a shell.

It will take commands from the input channel (keyboard) and execute them. A lot of UNIX shells also have been created to help with everyday tasks such as file management, file globbing and so on.

Most UNIX like operating systems comes with a set of shells, such as sh, the Bourne Shell, and tcsh, the improved C-shell, bash and so on.

Shell As A Programming Language

A shell can also serve as a programming language. You can put all commands into a single text file and execute as a shell script. A sample shell script:

echo "Today is `date`"
echo "Currently logged in users"
echo "Currently running process"
ps aux

Which Shell Do You Recommend?

It is really a matter of taste and personal choice. For e.g, if you are a C programmer you might feel more comfortable with a C-like shell such as csh or tcsh. Most new users especially with Linux background may like bash.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.