Zsh Workshop

http://www.acm.uiuc.edu/workshops/zsh/toc.html

The Zsh Startup Files

Like most shells, zsh processes a number of system and user startup files. It is very important to understand the order in which each file is read, and what conditions cause various files to be ignored. Otherwise, you may be entering commands and configurations into your startup files that aren't getting seen or executed by zsh.

The Startup Process

In the below description, zsh looks for user startup files in the user's home directory by default. To make it look in another directory, set the parameter ZDOTDIR to where you'd like zsh to look.

When zsh starts up, the following files are read (in order):

  • First, read /etc/zshenv

    If the RCS option is unset in this system file, all other startup files are skipped. (Can you say 'B O F H' ? I knew you could.)

  • Next, read ~/.zshenv
  • Next, IF the shell is a login shell, read /etc/zprofile, followed by ~/.zprofile
  • Next, IF the shell is interactive, read /etc/zshrc, followed by ~/.zshrc
  • Finally, if the shell is a login shell, read /etc/zlogin, followed by ~/.zlogin

Logging Out

When a user logs out, /etc/zlogout is read, followed by ZDOTDIR/.zlogout.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值