.bash_profile中的设置不起作用

sh/bash/dash/ksh/zsh等Shell脚本
回复
drongh
帖子: 1038
注册时间: 2007-01-10 9:32

.bash_profile中的设置不起作用

#1

帖子 drongh » 2012-09-25 21:30

这个文件是在登录时执行的,可是我在里面的设置没起作用。后来只能写在.bashrc里的。
请问为什么?
drongh
帖子: 1038
注册时间: 2007-01-10 9:32

Re: .bash_profile中的设置不起作用

#2

帖子 drongh » 2012-09-26 13:31

自己顶
funicorn
帖子: 1318
注册时间: 2005-09-13 4:56
系统: Ubuntu Jammy Jellyfi

Re: .bash_profile中的设置不起作用

#3

帖子 funicorn » 2012-09-26 13:47

谁告诉你这个脚本是在登录时执行的?
drongh
帖子: 1038
注册时间: 2007-01-10 9:32

Re: .bash_profile中的设置不起作用

#4

帖子 drongh » 2012-09-26 21:49

funicorn 写了:谁告诉你这个脚本是在登录时执行的?
对于.bash_profile或.bash_login,不是登入时执行,那是什么时候,我就是奇怪,系统重起后里面的配置文件没起作用。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: .bash_profile中的设置不起作用

#5

帖子 自由建客 » 2012-09-26 21:52

控制台登录执行 ~/.bash_profile,但 X 登录则不然。试试 ~/.xprofile。
drongh
帖子: 1038
注册时间: 2007-01-10 9:32

Re: .bash_profile中的设置不起作用

#6

帖子 drongh » 2012-09-26 22:04

自由建客 写了:控制台登录执行 ~/.bash_profile,但 X 登录则不然。试试 ~/.xprofile。
没用,我把全部配置写.bashrc里了。
难道bash在这两年里把这功能改了?
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: .bash_profile中的设置不起作用

#7

帖子 自由建客 » 2012-09-26 23:40

drongh, X 登录根本就不打开登录 shell。
回复