linux基础 --- shell
2015-11-02 15:44
357 查看
站在用户登录的角度来说,SHELL的类型:
登录式shell
正常通常某终端登录
su - USERNAME
su -l USERNAME
非登录式shell
su USERNAME
图形终端下打开命令窗口
自动执行的shell脚本
bash的配置文件:
全局配置: /etc/profile,/etc/profile.d/*.sh ,/etc/bashrc
个人配置:~/.bash_profile,~/.bashrc
profile类的文件作用: 设定环境变量 运行命令或脚本
bashrc类的文件的作用: 设定本地变量 定义别名
登录式shell读取配置文件顺序:
/etc/profile --> /etc/profile.d/*.sh -->~/.bash_profile --> ~/.bashrc --> /etc/bashrc
非登录式shell读取配置文件顺序:
~/.bashrc --> /etc/basrc --> /etc/profile.d/*.sh
登录式shell
正常通常某终端登录
su - USERNAME
su -l USERNAME
非登录式shell
su USERNAME
图形终端下打开命令窗口
自动执行的shell脚本
bash的配置文件:
全局配置: /etc/profile,/etc/profile.d/*.sh ,/etc/bashrc
个人配置:~/.bash_profile,~/.bashrc
profile类的文件作用: 设定环境变量 运行命令或脚本
bashrc类的文件的作用: 设定本地变量 定义别名
登录式shell读取配置文件顺序:
/etc/profile --> /etc/profile.d/*.sh -->~/.bash_profile --> ~/.bashrc --> /etc/bashrc
非登录式shell读取配置文件顺序:
~/.bashrc --> /etc/basrc --> /etc/profile.d/*.sh
相关文章推荐
- android wifi 无线调试
- 运维入门
- 动态清空 nohup 输出文件
- install scrapy with pip and easy_install
- Linux Shell常用技巧
- Shell 脚本编程陷阱
- VBS脚本写的Windows硬件检测工具分享
- 用vbscript实现隐藏任务栏图标的脚本
- 用autoit编写第一个脚本(Hello World)
- VBS调用WMI快速关闭IE的脚本
- 收集的ROS防火墙脚本
- JSP脚本漏洞面面观
- shell字符串操作详解
- 不错的批处理脚本 第一部分
- VBS脚本加密/解密VBS脚本(简易免杀版1.1)
- 不错的批处理脚本实例代码 第二部分
- 使用脚本和批处理清除电脑中的痕迹的代码第1/2页
- 让你的脚本说话