import os result = os.system('cat /etc/motd') print result result = os.system('uname -a') print result