1833767 Members
2508 Online
110063 Solutions
New Discussion

change to chs

 
SOLVED
Go to solution
Francois Bariselle_3
Regular Advisor

change to chs

I want change the profile of my user to use the c-shell by default.
How I can to this ?
Fais la ...
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: change to chs

The usual way is to modify the last field in /etc/passwd so that it will contain /usr/bin/csh

Whatever you do, make sure you NEVER do this to the root user. Your system will likely be unbootable if you do that for root.
Jeff Schussele
Honored Contributor

Re: change to chs

Hi Francois,

Two ways:

1) Edit the last field in the user's /etc/passwd entry to read /usr/bin/csh

2) Edit the user's .profile (if you leave the passwd file alone & it's sh or ksh) & have it run /usr/bin/csh as the last command in the file.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James R. Ferguson
Acclaimed Contributor

Re: change to chs

Hi:

You can edit your account in '/etc/passwd' and specify '/usr/bin/csh' for the startup shell (field-7 colon-delimited), or you can do:

# chsh /usr/bin/csh

BTW, whatever you do, *never* change root's shell from '/sbin/sh'. If you do, you will end up with an unbootable system!

Regards!

...JRF...
Paul Sperry
Honored Contributor

Re: change to chs

edit the /etc/passwd file
The last field is the users shell
change it to /usr/bin/csh

Note: use vipw to edit the file