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:
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:
#!/bin/sh echo "Today is `date`" echo "Currently logged in users" who 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.
🐧 0 comments... add one ↓
|Category||List of Unix and Linux commands|
|Disk space analyzers||df • ncdu • pydf|
|File Management||cat • cp • mkdir • tree|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||NetHogs • dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|