0

I am having difficulty with some shell commands and think that it is due to a failure of my shell being set to BASH.

The following commands solve my problem:

bash --login

Or simply by typing

bash

Therefore it seems that I need to reconfigure my shell to bash which should be simple. My default $SHELL variable is /bin/bash

I think it is due to the following setting under my terminal preferences:

run a custom command instead of my shell 
/bin/tcsh/

Why should my shell preferences be set to this, what is the advantage/use of tcsh over bash?

Also, how should I overcome this issue while still retaining use of any of the features which may rely upon this default terminal preference (/bin/tcsh)

Here is some of my system information:

Ubuntu 14.02
$SHELL 
/bin/bash
$BASH_VERSION
undefined variable

I have previously used the following command to change from DASH to BASH:

sudo dpkg-reconfigure dash

I have also previously used the following command:

sudo apt-get install csh
Joe
  • 13
  • 1
  • 1
  • 3
  • If you're running bash, you can't expect to have tcsh features available. Similarly if you're programming in python, you can't expect something particular to, say, perl. They're different languages. bash did borrow lots of its interactive features from tcsh. Is there any particular tcsh feature you especially need? – glenn jackman Dec 19 '15 at 19:06
  • The problem is your terminal preferences. Your terminal is invoking `/bin/tcsh` rather than your default shell because you configured it to do that. Remove that configuration setting and it should invoke `bash`. (And you haven't told us what terminal program you're using, so I can't tell you how to do it.) – Keith Thompson Dec 19 '15 at 19:55

1 Answers1

1

I suspect that you have /bin/bash already set, but to help you change it if not:

The default shell for an user is set inside /etc/passwd (usually).
You could see which is set for you by doing:

grep "user" /etc/passwd

Where user is your username in the system. The last value (after the last ":") is the value of shell set for you to use. You could change it in two ways, either by editing the file, or easier, by executing "chsh" (which means: "change login shell"):

$ chsh

It will ask for your password and then will ask for the shell you want to use, just write "/bin/bash".

Done. To make the changes apply to all the programs, just log-out and log-in again.

A second level of configuration belongs to the window that contain the console. I suspect that you are using gnome-terminal (the usual for Ubuntu). If not, then it may be konsole (for a KDE desktop). In any one of those, check that the configuration is not set to call "tcsh". Say which console/terminal you are using to give tips if you need them.