In computing, exec is a functionality of an operating system that runs an executable file in the context of an already existing process, replacing the previous executable. ... In OS command interpreters, the exec built-in command replaces the shell process with the specified program.