Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a "chsh" file in /etc/bash_completion.d . When I type "./chsh" in the directory /etc/bash_completion.d , nothing happens. Why?

If the "chsh" utility is disabled in Cygwin, are there ways to turn it on? If it's disabled, does it imply that all the utilities in /etc/bash_completion.d are disabled in Cygwin?

Update: It seems that the "chsh" utility isn't in any package of Cygwin. Is that right?

share|improve this question

migrated from Sep 1 '11 at 6:06

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

up vote 4 down vote accepted

The file in /etc/bash_completion.d is a library of command-line completion functions. It is not the chsh command.

share|improve this answer
Oh. Thanks. So the "chsh" command isn't available in Cygwin at all? – alex_wang Aug 31 '11 at 5:48
Probably not; it doesn't make much sense in a non-UNIX environment. If it's anywhere, it'll be at /bin/chsh or /usr/bin/chsh. – duskwuff Aug 31 '11 at 5:50
Thanks a lot. Then Cygwin only provides bash, right? There's no way to invoke another shell, e.g. tcsh? – alex_wang Aug 31 '11 at 5:55
Certainly Cygwin supports shells other than bash. I don't think tcsh is installed by default, but it's easy enough to install it (it's under "shells" when you run setup.exe). I don't remember whether chsh is available. If not, you can run tcsh manually or edit /etc/passwd. – Keith Thompson Aug 31 '11 at 6:22
Yep, Cygwin also offers zsh, mksh (a Korn Shell), and a few more. – ak2 Aug 31 '11 at 8:05

Well answered at

You need to edit /etc/passwd (with a text editor), change the last field in the line for your userid to /bin/tcsh

share|improve this answer

I suspect the reason for chsh not being available is that Cygwin doesn't have the setuid facility for allowing an executable to be run with the rights of its owner. This would be needed to allow chsh to change the shell entry in /etc/passwd when run by a limited user. Administrators can edit /etc/passwd directly anyway.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .