LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Questioons Using .bash_profile (https://www.linuxquestions.org/questions/linux-newbie-8/questioons-using-bash_profile-247493/)

Dan7el 10-26-2004 10:31 AM

Questioons Using .bash_profile
 
Honestly, I searched here for .bash_profile and bash_profile and nothing popped up.

Anyway, I want to automatically change the shell I'm using on a Linux box from /bin/sh to /bin/csh

Now, I know that can be done in the passwd file; however, I'm wanting to do it using the .bash_profile way instead.

Is this possible?

I created a .bash_profile in my home directory and put:

csh (I also tried exec csh)

Neither worked. Can anyone help?

Thanks!

---Dan---

sirclif 10-26-2004 10:55 AM

well, if you just want bash to come up, and then start a csh everytime, you can put csh at the bottom of your .bashrc file. .bash_profile is only read when you log into a shell i think. .bashrc is read everytime you bring up a new shell. im sure there is a way to just set csh as your default shell if that is what you want, but i dont know how

sirclif 10-26-2004 11:00 AM

i just found something that may do what your looking for. if you log into root and open the /etc/passwd file to edit, there is a list which includes the user accounts on the system. At the end of a line for a user you can set their default shell. it will take effect the next time they log in. hope this helps

Dan7el 10-26-2004 11:26 AM

Thanks
 
My admin guy changed the /etc/passwd file such that my shell is the csh.

I just recalled from the golden-olden days that this was possible and wanted to try it. I'll see what .bashrc does, but since my shell is now the C-shell, I'll have to test it on another system. I'm getting some ISO files down now to do a VMWARE install.

Thanks again!

---Dan---

apolinsky 10-26-2004 12:11 PM

.bashrc will do nothing if your default shell is not bash!

320mb 10-26-2004 03:58 PM

Uh, you might try-------

.cshrc
and/or
.csh_profile


All times are GMT -5. The time now is 06:26 PM.