Startup Files - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Startup Files

Description:

Make a backup copy of your .cshrc file before modifying it! 7. Listing Environmental Variables ... Make sure you make a backup of your .cshrc file before changing it! ... – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 12
Provided by: jimdab
Category:
Tags: files | make | startup

less

Transcript and Presenter's Notes

Title: Startup Files


1
Startup Files
  • Chapter 8

2
Shells
  • Remember that you always interact with a Unix
    system through a shell
  • miller by default uses the c-shell
  • This can be changed
  • chsh user name
  • Many different shells exist
  • c-shell, korn shell, bourn shell, t-shell,
    ez-shell, etc.

3
Initialization files (Control files)
  • Files that are used at the start of a login or
    the start of a program
  • Like preference files on Macs or PCs
  • .login
  • .cshrc
  • .forward
  • .plan
  • .pinerc
  • .elm
  • .emacs

4
Login and Shell Initialization Files
  • Two types of startup files
  • login initialization files which execute every
    time you log into the computer.
  • shell initialization files which execute every
    time you start a new shell.
  • In practice, you really only need to modify your
    shell initialization file.

5
Variables
  • Two kinds of variables exist
  • Environmental variables
  • Exist system wide
  • Used by the system to allow it to work properly
  • User-created variables
  • A user can create his or her own variables

6
The C-shell
  • .login file
  • used to set variables once per login
  • .cshrc file
  • used to set variables for each shell
  • Not much difference between the two
  • Best to modify just your .cshrc file
  • Make a backup copy of your .cshrc file before
    modifying it!

7
Listing Environmental Variables
  • setenv
  • Lists the current environmental variables for
    your login
  • Common ones include
  • TERM, HOME, SHELL, MAIL, PATH
  • Note the UPPERCASE

8
C-shell Special Variables
  • In addition to environmental variables, the
    C-shell has its own special variables
  • set
  • Include things like
  • history, noclobber, editmode, term, home, path,
    etc.
  • Note the lowercase

9
Setting Environmental Variables
  • Simple format
  • setenv variable name value
  • Can be set from the command line or from the
    .cshrc file
  • Make sure you make a backup of your .cshrc file
    before changing it!

10
Setting Special Variables
  • Simple format
  • set variable name value
  • Can be set from the command line or from the
    .cshrc file.
  • Make sure you make a backup of your .cshrc file
    before changing it!
  • Note that special variables will override
    environmental variables

11
Aliases
  • Alias is an alternate name for a command
  • Can create them on the command line or in your
    .cshrc file
  • Like variables, when created from the command
    line, they exist only for that login
  • Format
  • alias name command
  • Can be especially useful for changing default
    behavior for common commands
Write a Comment
User Comments (0)
About PowerShow.com