与用户登录shell相关的文件/etc/profile,~/bashrc等浅析
来源:互联网 发布:实验四栅格数据编码 编辑:程序博客网 时间:2024/05/12 11:01
http://leejia.blog.51cto.com/4356849/777700
在linux中,用户的登录也就是登录shell,是通过按次序的读取配置文件,根据文件设定用户的环境,从而来完成登录。配置文件对系统非常重要,而对我们系统工程师来讲,理解他们也是至关重要的,通过配置文件我们就可以知道系统是怎么启动的,用户时怎么登陆的。顾名思义,所谓全局配置文件,是对所有用户生效,是用户登录后的默认环境,可以通过编辑文件配置。而个人的配置文件只对当前用户生效,用户也可以自己更改自己的环境配置信息。下面我们来讨论用户登录所读取的文件及各文件的作用:
与用户登录相关的全局配置文件:/etc/profile,/etc/profile.d,/etc/bashrc等。
本文出自 “佳” 博客,请务必保留此出处http://leejia.blog.51cto.com/4356849/777700
===========================
ksh的变量设置文件是./kshrc
=================
http://www.yesadmin.com/301/134459/index.html
整理了一下
如何查看本机的linux使用的是什么shell ?
more /etc/shells 可以看到本系统中可以使用哪些shell
echo $SHELL 可以查看当前默认的shell
一般来讲/etc/passwd文件中最后一项是每个用户使用的shell,但不见得每个都是shell
$ useradd guest
$ more /etc/passwd
代码:
guest:x:502:502::/home/guest:/bin/bashguest:x:502:502::/home/guest:/bin/bash
请问这里的学问是?
看来你还得学学useradd命令
useradd [-g XXXX] [-G xxxx] [-d /home/guest -m /home/guest] -s /bin/false]
或者
useradd [-g XXXX] [-G xxxx] [-d /home/guest -m /home/guest] -s /bin/rbash]
或者
useradd [-g XXXX] [-G xxxx] [-d /home/guest -m /home/guest] -s /bin/nologin]
Go_To_CU
- 与用户登录shell相关的文件/etc/profile,~/bashrc等浅析
- /etc/profile,/etc/environment,.bash_profile及.bashrc等与环境变量有关的文件的比较
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc 文件
- 浅析linux下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc文件
- 浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc
- 登录shell 非登录shell /etc/bash.bashrc /etc/profile ~/.bashrc ~/.profile
- shell的初始化文件:/etc/profile和/etc /bashrc(bash.bashrc)
- shell的初始化文件:/etc/profile和/etc/bashrc(bash.bashrc)
- shell的初始化文件:/etc/profile和/etc/bashrc(bash.bashrc)
- linux登录时/etc/profile和/etc/bashrc等文件执行顺序和过程
- linux登录时/etc/profile和/etc/bashrc等文件执行顺序和过程
- 天线效应
- spring 定时器
- CSS - position:absolute VS position:relative
- 关于vs2005、vs2008和vs2010项目互转的总结
- [oracle学习] oracle 数据类型
- 与用户登录shell相关的文件/etc/profile,~/bashrc等浅析
- C++:静态联编和动态联编
- 图像与图形字体实现的比较
- DMA burst 基本概念
- mysql触发器
- 在对话框里面加入工具条CMFCToolBar
- Jquery实践之拖动DIV
- objective-c中self.的用法
- 微软、谷歌、百度等公司经典面试100题[第1-60题]及解答