我想将所有登录配置都集中在~/.bash_profile
。~/.bashrc
默认情况下有一个,但是我用替换了它~/.bash_profile
。
但是,当我登录时,在~/.bash_profile
获取资源之前,会显示以下内容:
Linux ubnt10-dev1 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
Ubuntu 10.04.4 LTS
Welcome to the Ubuntu Server!
* Documentation: http://www.ubuntu.com/server/doc
System information as of Fri May 9 12:17:39 EDT 2014
System load: 0.01 Processes: 74
Usage of /: 5.5% of 18.58GB Users logged in: 0
Memory usage: 4% IP address for eth0: 123.x.x.x
Swap usage: 0%
Graph this data and manage this system at https://landscape.canonical.com/
New release 'precise' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Fri May 9 12:11:52 2014 from 123.x.x.x
我想删除它,以便仅在我的~/.bash_profile
gets显示中定义我自己的启动问候,但是我不确定用户登录时源/执行的脚本的逻辑/顺序。您能启发我吗?
另外,我还想知道系统启动时(而不是在用户通过登录启动会话时)自动进行采购/执行的顺序,尽管这对我而言现在的重要性已降低。
export SET_IN_ETC_PROFILE=yes
输入/etc/profile
,export SET_IN_HOME_ZSHRC=yes
输入~/.zhshrc
(我是zsh用户),等等。然后重新启动,然后env|grep SET_IN
就会出现一个不错的故事。要查看桌面应用程序(您在不使用终端的情况下从仪表板或WM启动的变量)看到的变量,请参见askubuntu.com/a/356973/16395