The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Solaris login question, need guru's help duke0001 UNIX for Advanced & Expert Users 2 12-18-2006 09:08 AM
Solaris 10 login question, seek guru's help duke0001 SUN Solaris 1 12-15-2006 02:43 PM
user login script question termiEEE UNIX for Dummies Questions & Answers 2 02-03-2004 01:34 PM
Root login question skotapal UNIX for Dummies Questions & Answers 2 03-18-2003 08:16 PM
login question grassaj UNIX for Dummies Questions & Answers 1 10-12-2000 10:16 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-09-2004
Registered User
 

Join Date: Sep 2004
Location: Santa Barbara
Posts: 1
.proflie .login question

I have been searching how to do this and haven't been able to make it work. When I login to our Unix machine running SunOS 5.8 it automatically starts in csh but I want bash. I don't have access to chsh or password commands so I guess I need to change .profile or .login or .cshrc? Which one and what cammand do I need. I tried putting /bin/bash at the top of .profile but it didn't seem to do anything.

And can anyone explain the diff between .profile and .login? Keep in mind I am a complete noob to Unix. Thanks.

And what other 'cool' things can I do in these files?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-09-2004
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Every time you log in, the Unix shell searches your home directory for certain files and executes the commands in them. This allows you to customize your Unix session.

The .cshrc file is executed every time a new C shell is started. The .login is executed after the .cshrc file only when you initially log in. Generally, environment variables should be set in the .login file, and alias and set commands should be in the .cshrc file so that every new copy of the C shell will be able to use them.

The .profile is specific to the bourne and Korn shells and serves the same purpose. Not all shells use the same startup files. For instance, bash uses .bash_profile

Your default shell is set by the unix admin for your site. This is done by setting the 7th field in the /etc/passwd file. If you want your default shell changed then contact the admin and make that request.

You can also change your shell from the command line by typing the shells name. For exampe: ksh (however this only lasts for the duration of your current shells session).
Reply With Quote
  #3 (permalink)  
Old 09-16-2004
Karma's Avatar
Registered User
 

Join Date: Jun 2003
Location: Canada
Posts: 142
Or, if you don't want to bug your admin/your admin is an arse, you could just add the name of your shell of choice to the end of your .login file so you don't have to waste your time every time you log in switching shells.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0