== A gotcha with Bash on Ubuntu 8.04 Suppose that you have an Ubuntu 8.04 system where you have opted to make /bin/sh be bash, the way it used to be in 6.06, and you have an account with /bin/sh as the login shell (for example, you created it with plain _useradd_). So you log in to the account and everything seems normal and bash-y, until you try to do filename completion and get: > _$ ~~cd /~~-sh: <( compgen -d -- '/' ): No such file or directory_ (The text in ~~bold~~ is what you typed before you hit .) I'll give you the fix first: use _chsh_ to change your shell to be _/bin/bash_. Then everything will work right. This is one of those interestingly misleading error messages, although if you read very carefully Bash is actually sort of telling you what is going on. Let me give you a related example: > _$ cat < 'a random name'_ \\ > _sh: a random name: No such file or directory_ This error message has the same form as the first one but makes it much more obvious what the shell is complaining about. For filename completion, what seems to be going on is that when Bash is operating in sh-compatible mode as a login shell, it is bash-like enough to cause the Ubuntu 8.04 default dotfiles to load the bash command line completion shell functions, but those functions use Bash-specific syntax. As a result, Bash in sh-compatible mode interprets the _compgen_ command seen in the error message as one giant redirection and, of course, cannot find such a peculiarly named file. (I spent a long time being confused by the error message because I didn't read it carefully and thus didn't realize that it was complaining about a failed redirection instead of a failure to find _compgen_.) Short summary: this is an Ubuntu 8.04 bug caused by them not expecting _/bin/sh_ to be Bash and to be used as a login shell, although this is a theoretically supported configuration. This doesn't really surprise me; we've had plenty of experience to the effect that Ubuntu goes off the rails when you depart from their one standard configuration.