Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Differences between /usr/bin/login and /usr/bin/bash

What is the difference between /usr/bin/login, and /usr/bin/bash? Does the first command something more, or different from what done from the second command?
Is there any reason to choose the first as default shell?

share|improve this question

migrated from stackoverflow.com Jun 29 '10 at 2:58

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Ignacio Vazquez-Abrams, akira, Ivo Flipse Jun 29 '10 at 6:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Some people don't want to use bash as their default shell. –  Anon. Jun 29 '10 at 2:35
    
Those people should be found and re-educated :-) –  paxdiablo Jun 29 '10 at 2:41
    
@paxdiablo - what's wrong with using a program that can't be used as a shell at all due to not being a command line interpreter as ones default shell? :) –  DVK Jun 29 '10 at 3:08
    
@paxdiablo - on a serious note, people might just prefer tcsh, for example (for a variety of logical and good or sometimes sentimental and subjective reasons). –  DVK Jun 29 '10 at 3:08
add comment

1 Answer

up vote 3 down vote accepted

They are two very different things, and only commonality is that both usually run at the beginning of loggin in a user and both run a configuration dot-file (.login and .bashrc) that are essencially shell scripts. In addition bash, like many modern shells, also allows you to switch between users, which is one of the main purposes of login

In detail:

login is a program used to log in a user, at the end of which the shell (aka command line interpreter) is executed.

login only knows how to do one thing - log in a user (athenticate using username/password, set some environmental variables like TERM and PATH, and execute a couple of on-login admin tasks - see the link for details.

A unix shell (of which bash is an example of) is a command line interpreter coupled with a script interpreter, and its function is to accept input (from the user or supplied programmatically) and execute requested commands.

As far as I'm aware, login can not be used as a shell at all as it has no functionality of a command line interpreter.

share|improve this answer
    
Terminal.app has the setting "Shells open with:" with the option "Default login shell (/usr/bin/login)", and "Command (complete path)" that by default contains "/usr/bin/bash". –  kiamlaluno Jun 29 '10 at 8:48
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.