I'm trying to add an alias to the current shell, but it doesn't work. I'm used to Bash with Linux so I'd like to use Bourne shell (sh) with FreeBSD, at least for now.
Here's the config:
So I have to type
I updated the default shell to bash with
Is there any way to fix this?
Here's the config:
Code:
$ getent passwd bogdan
bogdan:*:1001:1001:Bogdan:/home/bogdan:/bin/sh
$ echo $SHELL
/bin/sh
$ cat ~/.shrc | grep abc
alias abc='echo Test'
$ abc
abc: not found
$ bash #which is found in /usr/local/bin/bash
[bogdan@lion ~]$ echo $SHELL
/bin/sh
[bogdan@hostname ~]$ abc
bash: abc: command not found
[bogdan@hostname ~]$ source ~/.shrc
bogdan@hostname$ echo $SHELL
/bin/sh
bogdan@hostname$ abc
Test
So I have to type
bash and then source the config file to get the alias working.I updated the default shell to bash with
chsh -s /usr/local/bin/bash bogdan and now the shell is recognized as bash, yet the alias doesn't run until I source the ~/.shrc file:
Code:
[bogdan@hostname ~]$ echo $SHELL
/usr/local/bin/bash
[bogdan@hostname ~]$ abc
bash: abc: command not found
[bogdan@hostname ~]$ source ~/.shrc
bogdan@hostname$ abc
Test
Is there any way to fix this?