Page 1 of 1

Source command not found

Posted: 2019/08/06 15:48:43
by helidagemo

I just got CentOS 6.10 minimal image installed, and ran into an issue as,
[sleo@localhost ~]$ source ~/.bashrc
source: command not found
Below is the sh I was running,
[sleo@localhost ~]$ ls -l `which sh`
lrwxrwxrwx. 1 root root 4 Jul 29 21:55 /bin/sh -> bash
But if I su as root, it can run well.

Any suggestion would be appreciated:)

Re: Source command not found

Posted: 2019/08/07 12:32:31
by TrevorH
bash behaves differently depending on whether it's invoked as bash or sh.