a summary a week(1311)

本文详细介绍了Linux系统中Shell启动时加载的各种配置文件的作用及执行顺序。包括了系统级和用户级的配置文件,如/etc/profile、~/.bash_profile等,并解释了如何设置和导出PATH环境变量。
摘要由CSDN通过智能技术生成

1.linux shell startup files

From   http://mmahmoodict.wikidot.com/blog:linux-startup-files

When an interactive login shell starts, it executes series of pre-defined startup files. Thelogin shell executes commands in following order.

  1. /etc/profile (applicable to all users)
  2. ~/.bash_profile
  3. ~/.bash_login
  4. ~/.profile,


but, by default there are only /etc/profile and ~/.profile in ubuntu13.04.


After that, any interactive non-login shell also executes commands in /etc/bashrc (applicable to all users) and ~/.bashrc. These files are not perfect for set PATH (specially, PATH=$PATH:.), since it may run multiple times.

$PATH typically set and exported in /etc/profile

During login, the system sets environment variables from the /etc/environment file before reading your login profile (.profile).

vi /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

2.八数码问题
http://blog.csdn.net/luxiaoxun/article/details/7629331
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值