1748060 Members
5435 Online
108758 Solutions
New Discussion юеВ

profile

 
SOLVED
Go to solution
himacs
Super Advisor

profile

Hi admins,

Anyone please explain me difference betwwen .profile and .login


regards
himacs
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: profile

.profile is used for ksh and sh shells.

.login is used for csh.

himacs
Super Advisor

Re: profile

Hi

please tell me why ksh and csh used where exactly used?

thanx in advance

regards
himacs
Ganesan R
Honored Contributor

Re: profile

Both are user profiles. Depends on the shell for the user, corresponding profile will be used.
Best wishes,

Ganesh.
Ganesan R
Honored Contributor
Solution

Re: profile

Hi,

You need to learn the basics then. These are different login shells which will be executed at the time of user logs in. Each shells has its own capablities and features.
It will be specified in /etc/passwd file.

Basic definition of shell:

Users of the UNIX system don't have a direct interaction with the kernel. Instead, the
user always works with a program called the UNIX shell. A shell can be considered a
command interpreter. The shell takes user commands, interprets them, and takes the
necessary action to execute them. It also provides the output of these commands to the
user.

C shell:
It uses a C language-like syntax for shell programming.

Korn shell:
It has more complex and advanced features than the Bourne or C
shell and takes more time to master
Best wishes,

Ganesh.
T G Manikandan
Honored Contributor

Re: profile

There are different shells
/bin/sh Bourne shell
/bin/bash The Bash shell
/bin/ksh Korn shell
/bin/csh C shell

and many more and they have initialization files .profile for korn and sh and .login .cshrc for csh

the system wide initialization file is the /etc/profile where you have the umask set so that it reflects for the created users.
Patrick Wallek
Honored Contributor

Re: profile

>>/bin/sh Bourne shell

Not correct, at least in HP-UX!

/sbin/sh and /usr/bin/sh (/bin/ is a link to /usr/bin) is the **POSIX** shell, **NOT** the Bourne shell.

# man sh-posix