Forem

Santhosh Kumar
Santhosh Kumar

Posted on

3

BASH SHELL

This post was originally published on my blog, find original post here

What is shell ?

Computers understand the language of binary. In early days of computing, instructions were provided using binary language which is difficult to write and read.So, to make the intructions into readable understandable format , in an operating system there is a special program is called the shell. The shell accepts human readable commands and translate into something kernel can read and process those intructions.

The shell is a user program or an environment provided for user interaction. It is command language interceptor that executes the command from the standard input device like keyboard or from a file. The shell gets started when we log in or open a terminal (console).

The most common Linux shell is named "Bash shell".

Bash shell

The bash shell was inspired by Bourne shell. It is one of the most important softwares in a Linux system.

Shortcut for opening terminal in linux system is CTRL + ALT + T.

When we open the terminal , it will present us with prompt asking us to enter a command .santhosh is user name, ubuntu-18-04 is my system name.

santhosh@ubuntu-18-04:~$ _

~ in the prompt shows us that we are in user home directory.
if I am the root, then my home directory will be /.

To find out which shell we are using .

Use help command to print shell name and its version

santhosh@ubuntu-18-04:~$ help
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
These shell commands are defined internally.  Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.

or you can print system variable SHELL to get the shell

santhosh@ubuntu-18-04:~$ echo $SHELL
/bin/bash

echo is a command which is used to display message or system variable.

santhosh@ubuntu-18-04:~$ echo message
message

When we enter a command , it is actually stored in history (.bash_history file in home directory ), so we don't have to re-type the previously entered commands, we can just traverse this history using the up ⬆️ and ⬇️ down arrow keys.

we can display user name of user using simple whoami command.

santhosh@ubuntu-18-04:~$ whoami
santhosh

we can get documentation
or manual of commands using man

santhosh@ubuntu-18-04:~$ man whoami

To exit from the manual page, press q .

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay