what's the difference between .bush.rc and .bash_profile?
来源:互联网 发布:mac 10 少女前线 编辑:程序博客网 时间:2024/05/21 22:28
According to the bash man page, .bash_profile
is executed for login shells, while .bashrc
is executed for interactive non-login shells.
What is a login or non-login shell?
When you login (type username and password) via console, either sitting at the machine, or remotely via ssh:.bash_profile
is executed to configure your shell before the initial command prompt.
But, if you’ve already logged into your machine and open a new terminal window (xterm) inside Gnome or KDE, then .bashrc
is executed before the window command prompt. .bashrc
is also run when you start a new bash instance by typing /bin/bash
in a terminal.
Why two different files?
Say, you’d like to print some lengthy diagnostic information about your machine each time you login (load average, memory usage, current users, etc). You only want to see it on login, so you only want to place this in your .bash_profile
. If you put it in your .bashrc
, you’d see it every time you open a new terminal window.
- what's the difference between .bush.rc and .bash_profile?
- What's the difference between an event and a delegate?
- what's the difference between OnDraw and OnPaint
- What's the difference between stack and heap?
- What's the difference between LastWriteTime and ChangeTime in FILE_BASIC_INFO?
- What's the difference between Heap and Stack
- What's the difference between overload and override
- What's the difference between glibc and libc6?
- What's the difference between "but" and "yet"
- What's+the+difference+between+virtualization+and+cloud+computing?
- What's the difference between parallel and concurrent?
- What's the difference between program arguments and VM arguments?
- What's the difference between Template and Table in Smartforms
- What's the difference between “local” and “my” in Perl
- what's the difference between int (* f [])(); and int f[]();
- What's the difference between gcc and g++/gcc-c++?
- What's the difference between headsets and headphones?
- What's the difference between HWND_TOP and HWND_TOPMOST?
- xcode5中的Provisioning Profile删除
- java配置文件property文件内容的修改
- UVA 10763 - Foreign Exchange
- Eclipse自动补全变量名
- C++中引用和指针的区别
- what's the difference between .bush.rc and .bash_profile?
- HDU 5011 Game(西安网络赛E题)
- HDU 5011 Game(Nim博弈)
- hdu 5009 Paint Pearls(dp)
- hdu 5014 Number Sequence 2014 ACM/ICPC Asia Regional Xi'an Online 数论
- 引用与指针
- mac os 获取root/su/sudo权限的方法
- 双向链表(插入,删除,追加,正反向遍历,查找。。。)
- 相册