os.system 在 Python 中使用什么 shell?

Ner*_*nux 7 python

在 Python 中,当我运行命令时

os.system
Run Code Online (Sandbox Code Playgroud)

使用什么外壳?

Rin*_*ind 5

默认情况下,它将在 Bourne shell 中运行(即/bin/sh)。

os.system("/bin/bash \"echo 'Rincewind rules' \" ")使用bash并让它呼应“Rincewind 规则”。