exec

Replace the shell with a command

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

`exec cmd` runs cmd in place of the shell. `exec >file` redirects the whole script’s output.

Examples
exec bash -lRestart your shell · explain & risk-check →
exec > >(tee out.log) 2>&1Log everything the script prints · explain & risk-check →
Related
bash nohup
Open the full explainer →More in Shell & Scripting

Reference text is hand-written and may be incomplete — check man exec for your version. Test destructive commands on a non-production system first.