$ source /etc/environment
$ sudo source /etc/environment
[sudo] password for t:
sudo: source: command not found
It seems that a different shell than bash is run to execute source /etc/environment and that shell doesn't have source as builtin.
But my and the root's default shells are both bash.
$ echo $SHELL
/bin/bash
If sudo indeeds uses a different shell, why is it? I saw slm's reply, but don't understand in my case.
sourceis a shell builtin..you can not usesudoto run a shell builtin like an external command..