How to fix the 'source: not found' error in Ubuntu

Updated at:

If you receive a source: not found error when you run a shell script in Ubuntu, the cause may be that the shell interpreter is not bash. To resolve this error, change the shell interpreter to bash.

Ubuntu is an open source GNU/Linux operating system published by Canonical Ltd. It is primarily designed for desktop use and supports x86, amd64 (also known as x64), and PPC architectures.

Follow these steps to change the shell interpreter:

  1. Run the ls -l /bin/sh command. If the output is /bin/sh -> dash, the shell interpreter is dash.
  2. Run the dpkg-reconfigure dash command and select No.
    Important This step requires root permissions.
  3. Run the ls -l /bin/sh command again. If the output is /bin/sh -> bash, the shell interpreter has been changed to bash.