How to find which shell I am using on Linux

Question: I often change between different shells at the command line. Is there a quick and easy way to find out which shell I am currently in? Also how can I find out the version of the shell? Find out Which Shell You are In There are different ways to tell what shell you are […]
Continue reading…

 

How to get the process ID (PID) of a shell script

Question: I want to know the process ID (PID) of the subshell under which my shell script is running. How can I find a PID in a bash shell script? When you execute a shell script, it will launch a process known as a subshell. As a child process of the main shell, a subshell […]
Continue reading…

 

How to detect and patch Shellshock vulnerability in bash​​

Question: I would like to know how to test whether or not my Linux server is vulnerable to bash Shellshock bug, and how to protect my Linux server against the Shellshock exploit. On September 24, 2014, a bash vulnerability nicknamed “Shellshock” (aka “Bashdoor” or “Bash bug”) was discovered by a security researcher named Stephane Chazelas. […]
Continue reading…