source_cmd = 'source /etc/profile' subprocess.run(source_cmd, shell=True, executable="/bin/bash", capture_output=True)