1 / 10

Advanced UNIX

This guide explores various UNIX shells, including Bourne, C, Bash, Zsh, Korn, and Tcsh. We discuss the fundamental role of a shell as both a command interpreter and a programming language, essential for writing shell scripts. The document details how commands executed in a shell create processes, enabling multitasking. It explains typical UNIX shell usage patterns and provides instructions for temporarily changing your shell or setting a default shell using the `chsh` command. Gain insights into optimizing your UNIX experience through shell selection and customization.

Download Presentation

Advanced UNIX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced UNIX 240-491 Special Topics in Comp. Eng. 1Semester 2, 2000-2001 • Objectives • to discuss the various UNIX shells 5. Which Shell?

  2. Overview 1. What is a Shell? 2. There are many UNIX Shells 3. The ‘usual’ Mix 4. Changing your Shell

  3. 1. What is a Shell? • A command interpreter and • a programming language. • The programing language part is used to write shell scripts.

  4. Processes • When your shell executes a command (or script), it forks (creates) a process. • A process is a separate executing entity, with its own Process ID (PID) and memory. • UNIX allows many processes to execute at once • multi-tasking

  5. 2. There are many UNIX Shells Just a few of them. Name of Shell Size of Man Relative Command Page (Bytes) Complexity Name Bourne Shell 44,500 1.00 sh C-Shell 76,816 1.73 csh Bash 127,361 2.86 bash Zsh 133,565 3.00 zsh Korn Shell 141,391 3.18 ksh Tcsh 199,834 4.49 tcsh

  6. Relationships • Bourne • popular, simple, good scripting • extended versions include: • Bash, Korn, Zsh • the Bash shell is the common Linux shell • C-Shell • a good command interpreter • extended versions include Tcsh

  7. 3. The ‘usual’ Mix • Most UNIX users use: • C-Shell • for command processing • Bourne/Bash Shells • for writing scripts • We will discuss these; if you want to be a hacker then learn the others for yourself!

  8. 4. Changing your Shell • Temporary change by executing the shell command: $ csh • Return to the default shell with: $ exit or $ ctrl-D

  9. Changing your Default Shell • Use chsh: chsh [-s name-of-shell] [userid] e.g. $ chsh $ chsh -s /bin/csh ad • chshis often disabled; then you must talk to the system administrator to change your shell.

  10. Shells on calvin • $ cat /etc/shells • $ apropos shell | more • Also try $ whereis <shellname> $ locate <shellname> | more

More Related