Run a program in a new session setting the current terminal as the controlling terminal

setsid

  • Run a program in a new session if the calling process is not a process group leader.
    The created session is by default not controlled by the current terminal.
    More information: <https://manned.org/setsid>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

setsid --ctty {{program}}

click the source code to copy install setsid on any operating system with command-not-found.com