bedtama.blogg.se

Keep cmd window open
Keep cmd window open












Therefore, the best to use is exec bash or exec $SHELL, as says in his comment. Also, I've determined that all 3 of these at the end will keep the terminal open: bash, eval bash, exec bash, but only the latter, exec bash, will then allow you to close the terminal without it warning you a process is still running. Therefore, using bash in place of $SHELL is identical. which bash shows that the bash executable is located in /usr/bin/bash, however. On my system (this was last tested and checked on Ubuntu 20.04), echo $SHELL shows that the SHELL variable contains /bin/bash. This answer is borrowed in part from answer, Palazo's answer, and Corbellini's comment under Stefano's answer.

keep cmd window open

There isn't an answer showing exec bash as the right answer, but there should be, so here it is. Use exec bash or exec $SHELL at the end of a command to keep the terminal open after running the command.














Keep cmd window open