GTU OS Program - 12 UNIX shell & Environment variables

12. Study of Unix Shell and Environment Variables.

A shell provides us with an interface to the unix system. It takes input from us and executes programs based on that input.
Shell is an environment where we can run our commands, programs and shell scripts. There are different types of Shell as there are different types of operating systems.

Shell Prompt

The prompt $ which is called the command prompt, is issued by the shell. While the prompt is displayed, you can type a command.

Types of shells

Bourne shell

In this type of shell the $ character is the default prompt.

Subcategories of Bourne shell

  • Bourne shell (sh)
  • Korn shell (ksh)
  • Bourne Again shell (bash)
  • POSIX shell (sh)

C shell

In this type of shell the % character is the default prompt.

Sub categories of C-type shell

  • C Shell (csh)
  • TENEX/TOPS C shell (tcsh)

Environment Variables

Environment Variables are variables that are set up in your shell when you login. They are called "environment Variables" because most of them affect the way your UNIX shell works for you.

Environment Variables allows us to customize how the system works and the behavior of the applications of the system.

How to see Environment Variables in ubuntu?

printenv is used to display environment variables in ubuntu.
tkanu025@hp:~$ printenv

you will get the output like the one below

Unix shell and Environment Variables gtu study material for engineering students

Here are some of the most common environment variables

  • USER - The current logged in user
  • HOME - The home directory of the current user.
  • SHELL - The path of the current user's shell such as bash or zsh.
  • LOGNAME - the name of the current user
  • LANG - the current locales settings
  • TERM - The current terminal emulation
  • EDITOR - The default file editor to be used

gtu os lab manual,

os GTU Practical,

operating system Programs,

Operating system shellscript programs,

Gtu study material 3140705,

OS 3140702,

os practical list,

shell script programming,

gtu os practical,

os lab solution gtu

Unix Shell and Environment Variables.

Comments

YouTube

Popular posts from this blog

GTU OOP Program - 18

GTU OS Program - 7

GTU OS Program - 3