LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2004, 10:31 AM   #1
Dan7el
LQ Newbie
 
Registered: Oct 2004
Location: Albany, NY
Posts: 2

Rep: Reputation: 0
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---
 
Old 10-26-2004, 10:55 AM   #2
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
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
 
Old 10-26-2004, 11:00 AM   #3
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
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
 
Old 10-26-2004, 11:26 AM   #4
Dan7el
LQ Newbie
 
Registered: Oct 2004
Location: Albany, NY
Posts: 2

Original Poster
Rep: Reputation: 0
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---
 
Old 10-26-2004, 12:11 PM   #5
apolinsky
Member
 
Registered: Oct 2004
Location: Brooklyn
Distribution: Slackware 14.1, 14.2; Debian Jessie; Centos 6; FreeBSD 9 & 10
Posts: 272

Rep: Reputation: 35
.bashrc will do nothing if your default shell is not bash!
 
Old 10-26-2004, 03:58 PM   #6
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Uh, you might try-------

.cshrc
and/or
.csh_profile
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bash_profile dimi Linux - General 1 08-23-2005 08:00 PM
.bash_profile nguye103 Linux - Software 3 10-22-2004 01:48 PM
where is ~/.bash_profile? Jskill007 Slackware 4 09-17-2004 11:04 PM
.bash_profile sikandar Linux - Software 9 08-31-2003 10:01 AM
.bash_profile Wasim Haider Linux - General 2 09-16-2002 07:12 AM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration