Linux - Shell
About
A shell in the UNIX/LINUX world is a piece of software that provides an interface for users to an operating system which provides access to the services of a kernel.
The name shell originates from shells being an outer layer of interface between the user and the innards of the operating system (the kernel).
Several type of shell have been developped:
- Korn,
- C
Articles Related
Prompt
The following table shows the commonly used default UNIX® system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.
| Shell | Prompt |
|---|---|
| C shell | machine_name% |
| C shell for superuser | machine_name# |
| Bourne shell and Korn shell | $ |
| Bourne shell and Korn shell for superuser | # |
How to find the Shell that I used ?
With the environment variable $SHELL
[root@oel5u5 ~]# echo $SHELL /bin/bash
With ps
[root@oel5u5 ~]# ps -p $$ PID TTY TIME CMD 4104 pts/1 00:00:00 bash
where:
- $ argument passed to -p returns the PID (process identification number) of the current process which is your shell
Then running a ps on that number displays a process status listing of your shell.