1 / 9

Unix/Linux shells

Unix/Linux shells. Shells. “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems.”

leo-larson
Download Presentation

Unix/Linux shells

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. Unix/Linux shells

  2. Shells • “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems.” • “Users direct the operation of the computer by entering commands as text for a command line interpreter to execute or by creating text scripts of one or more such commands.” • from wikipedia

  3. Shells • most popular: • sh • written by (Stephen) Bourne shell, 1977 • csh • written Bill Joy • bash • Bourne Again shell (Unix, Linux, Mac OS) • others: • ash, dash, es, fish, ksh, mksh, psh, rc, scsh, tcsh, zoidberg, zsh

  4. Which shell is my default shell?

  5. Configuration files • When you log in, the shell will load your configuration file (if present). • These files start with a period (.) and should be located in your home directory, (~). • These files are not listed by ls by default. (They are “invisible.”) To have ls list them, use the –a option. • Use .cshrc for csh; use .bashrc for bash.

  6. Example .cshrc

  7. Example .bashrc

  8. Differences between csh and bash • setenv (csh) vs. export (bash) • setenvPATH /home/ggrevera/mpich2-install/bin:$PATH • export PATH=/usr/ccs/bin:$PATH • alias (csh) vs. alias (bash) • alias emacs /home/ggrevera/emacs-23.4/src/emacs • alias emacs=/home/ggrevera/emacs-23.4/src/emacs

  9. How does one run/exit a shell? • To run a shell, simply type its name. • bash • To exit a shell, simply enter the exit command. • exit • (When you exit your last shell, you will log out of the system.)

More Related