There are two main modules in Python, os and subprocess, that allow executing Linux commands. The subprocess module's call() and Popen() functions execute commands and allow interacting with processes by passing arguments, reading from standard output and error streams, and setting whether to use the shell.