Ubuntu的shell执行过程
登录shell(login shell)会执行.bash_profile,.bash_profile中会执行.profile,.profile中会执行.bashrc
非登录shell(non-login shell)会执行.bashrc
An interactive login shell is started after a successful login, using /bin/login, by reading the /etc/passwd file. This shell invocation normally reads /etc/profile and its private equivalent ~/.bash_profile upon startup.
An interactive non-login shell is normally started at the command-line using a shell program (e.g., [prompt]$/bin/bash) or by the /bin/su command. An interactive non-login shell is also started with a terminal program such as xterm or konsole
from within a graphical environment. This type of shell invocation
normally copies the parent environment and then reads the user's
~/.bashrc file for additional startup configuration instructions.
A non-interactive shell is usually present when a shell script is
running. It is non-interactive because it is processing a script and not
waiting for user input between commands. For these shell invocations,
only the environment inherited from the parent shell is used.
The file ~/.bash_logout is not used for an invocation of the shell. It
is read and executed when a user exits from an interactive login shell.
Ubuntu的shell执行过程的更多相关文章
- shell查看执行过程及时间变量
sh -xv test.sh #加参数xv查看shell执行过程. Shell 调用系统时间变量 获取今天时期:`date +%Y%m%d` 或 `date +%F` 或date +%Y-%m- ...
- shell脚本学习—Shell执行脚本
Shell作用是解释执行用户的命令,用户输入一条命令,Shell就解释执行这一条,这种方式称为交互式,但还有另一种执行命令的方式称为批处理方式,用户事先写一个Shell脚本,Shell可以一次把这些命 ...
- Shell执行脚本
Shell作用是解释执行用户的命令,用户输入一条命令,Shell就解释执行这一条,这种方式称为交互式,但还有另一种执行命令的方式称为批处理方式,用户事先写一个Shell脚本,Shell可以一次把这些命 ...
- bash命令检测Shell脚本中的语法错误和查看详细执行过程
(1).bash命令检测Shell脚本中的语法错误 bash -v [脚本] [root@youxi1 ~]# vim a.sh #/bin/bash sum=$[$1+$2] echoo $sum ...
- shell脚本编程之变量简介及脚本执行过程
脚本变量简介 变量类型:字符型.数值型.真.假:事先确定数据的存放格式和长度: 变量存放在内存空间: 编译型语言,没有额外的处理逻辑,属于强类型语言: 脚本型语言,可以有解释器控制:所以,可以是弱类型 ...
- Java中JIN机制及System.loadLibrary() 的执行过程
Android平台Native开发与JNI机制详解 http://mysuperbaby.iteye.com/blog/915425 个人认为下面这篇转载的文章写的很清晰很不错. 注意Android平 ...
- Ubuntu常用shell命令
目录 ls cd mkdir mv cp scp rm df du chmod chown chgrp head tail screen apt-get Ubuntu常用shell命令 Ubuntu作 ...
- openstack nova 源码解析 — Nova API 执行过程从(novaclient到Action)
目录 目录 Nova API Nova API 的执行过程 novaclient 将 Commands 转换为标准的HTTP请求 PasteDeploy 将 HTTP 请求路由到具体的 WSGI Ap ...
- 结合中断上下文切换和进程上下文切换分析Linux内核的一般执行过程
结合中断上下文切换和进程上下文切换分析Linux内核的一般执行过程 目录 结合中断上下文切换和进程上下文切换分析Linux内核的一般执行过程 一. 实验准备 二. 实验过程 I 分析中断上下文的切换 ...
随机推荐
- 使用Fiddler进行抓包
参考:http://blog.csdn.net/gld824125233/article/details/52588275 1.手机跟电脑需要使用同一个局域网 如果是台式机需要将手机的mac地址让运 ...
- 2749: [HAOI2012]外星人
首先像我一样把柿子画出来或者看下hint 你就会发现其实是多了个p-1这样的东东 然后除非是2他们都是偶数,而2就直接到0了 算一下2出现的次数就好 #include<cstdio> #i ...
- WebSocket在Asp.Net中的例子
环境 以下代码环境要求:win8或win10, .net4.5+IIS8 部署到IIS8上面 转到 Windows程序和功能 -打开Windows功能里面 IIS选项启动4.5 和WebSocket支 ...
- java 语法 —— final
final 成员变量的初始化问题: 1. 实现特别的约束和限制 指向一个 static 型私有成员(仅调用一次), public class Coffee { private static long ...
- DCloud-MUI:事件管理
ylbtech-DCloud-MUI:事件管理 极简的JS函数 1.返回顶部 1.事件绑定 除了可以使用addEventListener()方法监听某个特定元素上的事件外, 也可以使用.on()方法实 ...
- python3用list实现栈
工作中遇到的需求,****代表标签数据别的信息: D01 ******** 1 ******** D01 ******** 2 ******** D01 ******** 3 ******** D01 ...
- bzoj3687简单题(dp+bitset优化)
3687: 简单题 Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 861 Solved: 399[Submit][Status][Discuss] ...
- [转]RDLC报表——动态添加列
本文转自:http://www.cnblogs.com/pszw/archive/2012/07/19/2599937.html 前言 最近接到一个需求:在给定的数据源中,某(些)列,可能需要单独统计 ...
- B - Bit++
Problem description The classic programming language of Bitland is Bit++. This language is so peculi ...
- HTML5 postMessage 和 localStorage 实现窗口间通信
LocalStorage(不能跨域) 基本思想:通过localStorage的标准事件storage来实现跨页面通信,即页面A通过写入特定数据触发页面B的storage事件,页面B响应之后再写入数据通 ...