Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22700
  • 博文数量: 7
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 68
  • 用 户 组: 普通用户
  • 注册时间: 2014-02-20 12:06
文章分类
文章存档

2014年(7)

我的朋友

分类: LINUX

2014-02-20 16:16:03

Although not a comprehensive list, the following should provide you with a basic understanding of what startup and shutdown files the various Unix shells use.

Note: This information comes from the Unix FAQ, which is posted regularly to the Usenet newsgroups comp.unix.questions and comp.unix.shell. You can obtain it by FTP from rtfm.mit.edu in the /pub/usenet directory, and on the web at:


csh

Some versions have systemwide .cshrc and .login files. Each version puts them in different places.

Startup (in this order): Upon termination: Others:
.cshrc (always) .logout (login shells) .history (saves history based on "$savehist")
.login (login shells)


tcsh

Startup (in this order): Upon termination: Others:
/etc/csh.cshrc (always) .logout (login shells) .history (saves history based on "$savehist")
/etc/csh.login (login shells)
.cshdirs (saves directory stack)
.tcshrc (always)
.cshrc (if no .tcshrc file is present)
.login (login shells)

sh

Startup (in this order): Upon termination:
/etc/profile (login shells) Any command or script specified using the command: trap "command" 0
.profile (login shells)


ksh

Startup (in this order): Upon termination:
/etc/profile (login shells) Any command or script specified using the command: trap "command" 0
.profile (login shells)
$ENV (always, if it is set)


bash

Startup (in this order): Upon termination: Others:
/etc/profile (login shells) .bash_logout (login shells) .inputrc (readline initialization)
.bash_profile (login shells)
.profile (login if no .bash_profile file is present)
.bashrc (interactive non-login shells)
$ENV (non-interactive shells)


zsh

Startup (in this order): Upon termination:
.zshenv (always, unless the  -f  option is specified) .zlogout (login shells)
.zprofile (login shells)
.zshrc (interactive shells, unless the  -f  option is specified)
.zlogin (login shells)


rc

Startup (in this order):

.rcrc (login shells)

At Indiana University, for personal or departmental Linux or Unix systems support, see

This is document abdy in domain all.
Last modified on June 07, 2012.
阅读(566) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~