NerdOfLinux Asked: 2017-11-16 06:28:29 +0800 CST2017-11-16 06:28:29 +0800 CST 2017-11-16 06:28:29 +0800 CST What shell does os.system use in Python? 772 In Python, when I run a command with os.system what shell gets used? python 1 Answers Voted Best Answer Rinzwind 2017-11-16T06:32:02+08:002017-11-16T06:32:02+08:00 By default it will run in the Bourne shell (that would be /bin/sh). os.system("/bin/bash \"echo 'Rincewind rules' \" ") to use bash and have it echo "Rincewind rules".
By default it will run in the Bourne shell (that would be
/bin/sh
).os.system("/bin/bash \"echo 'Rincewind rules' \" ")
to usebash
and have it echo "Rincewind rules".