Search code examples
shellsystem

Shell commands that do not launch a new process


What are some system commands that do not launch a separate process? I think cd is one. Are there any others? What about the commands more and less?


Solution

  • The bash manual lists all built-in commands, which I believe will be run in the same process as the shell. Other shells should list them in their own manuals, and any posix compatible shell (including bash) must build in the type command, which can be used to find out whether another command is built-in. I don’t see more or less in the built-in list for bash so they must run in separate processes.