What is a shell? What are shell variables?What is a shell?
- A shell is an interface to the user of any operating system.
- It gathers input from you and executes program based on that input.
- The users instruct an operation to the computer by typing commands as text for the execution.
- It is an environment in which we can run our commands, programs and shell scripts.
Shell variables:
- Shell variables are special variables.
- They are name and value pairs created and maintained by the concerned shell.
- Shell variables are contained exclusively within the shell in which they were set or defined.
- It is a set of shell and is required by the shell in order to function correctly.
Following are the different shell variables:
1. PATH: A list of directories that the system will check when looking for commands.
2. HOME: The current user's home directory.
3. MAIL: The path to the current user's mailbox.
4. TERM: It specifies the type of terminal to emulate when running the shell.
5. USER: The current logged user.
6. PWD: The current working directory.
|