If the exit command doesn't work to terminate the shell spawned by sudo find /home -exec /bin/bash \;, you can try the following alternatives:
-
Press
Ctrl+D: This sends an EOF (End Of File) signal, which will also exit the shell. -
Press
Ctrl+C: This interrupts the current process and may return you to the previous shell. -
Use
killcommand: If you know the process ID (PID) of the spawned shell, you can open another terminal and run:kill <PID>Replace
<PID>with the actual process ID. -
If all else fails: You can forcefully terminate the terminal session by closing the terminal window or tab.
If you need more assistance, let me know!
