How can you tell what shell you are running on UNIX system?


You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.



Explore posts in the same categories: C/C++ Interview Questions, UNIX Interview Questions


BOOKMARK THIS : del.icio.us | Digg it | Furl | reddit |


Related Questions :

  • How can you tell what shell you are running on UNIX system?
  • You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a...
  • What Happens when you execute a program?
  • When you execute a program on your UNIX system, the system creates a special environment for that program. This environment...
  • What is a shell?
  • A shell is an interactive user interface to an operating system services that allows an user to enter commands as...
  • What can you type at a command line to determine which shell you are using?
  • echo $SHELL-The name and path to the shell you are using is saved to the SHELL environment variable. You can...
  • What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory Management?
  • Historic Unix uses Swapping – entire process is transferred to the main memory from the swap device, whereas the Unix...
  • What is a pseudo tty?
  • In Unix, a pseudo terminal is a pseudo-device pair that provides a text terminal interface without associated virtual console, computer...
  • How the Kernel handles the fork() system call in traditional Unix and in the System V Unix, while swapping?
  • Kernel in traditional Unix, makes the duplicate copy of the parent’s address space and attaches it to the child’s process,...
  • What are shell variables?
  • Shell variables are special variables, a name-value pair created and maintained by the shell. Example: PATH, HOME, MAIL and TERM...
  • Could you tell something about the Unix System Kernel?
  • The kernel is the heart of the UNIX operating system, it’s responsible for controlling the computer’s resources and scheduling user...
  • What are the process states in Unix?
  • As a process executes it changes state according to its circumstances. Unix processes have the following states: Running : The process...

    Comment:

    You must be logged in to post a comment.