权限管理(二)

SHELL的类型

登录式shell

正常通过终端登录

su �C USERNAME

su �Cl USERNAME

非登录式shell:

su USERNAME

图形终端下打开命令窗口

bash的配置文件

全局配置

/etc/profile,/etc/profile.d/*.sh,/etc/bashrc

个人配置

~/.bash_profile,~/.bashrc

profile类的文件:

设定环境变量

运行命令或脚本

bashrc类的文件

设定本地变量

定义命令别名

 

登录式shell如何读取配置文件?

/etc/profile �C> /etc/profile.d/*.sh �C> ~/.bash_profile --->~/.bashrc �C>/etc/bashrc

非登录shell的如何配置文件

~/.bashrc �C>/etc/basrc �C/etc/profile.d/*.sh

登录时打印出欢迎加时间

vim /root/.bash_profile

echo "Hello,wangyijun ,Welcome to our system `date`"

把登录语言临时改成英文

vim /root/.bashrc

export LANG=en.US.utf8

你可能感兴趣的:(profile,配置文件)