Best Answer: What Happens When You Execute a Command in Linux?
Contents

What is execute command in Linux?

exec command in Linux is used to execute a command from the bash itself. This command does not create a new process it just replaces the bash with the command to be executed. If the exec command is successful, it does not return to the calling process.

What happens when we execute a program?

Once you run a program, the operating system allocates a runtime process for the program to utilize. This process helps allocate memory for the program, setup any resources that are needed, and begin execution of the program on the CPU using a thread. … Once a program is finished, the opposite happens.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest