The Computer Oracle

Accidentally sourced .bash_history

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Thinking It Over

--

Chapters
00:00 Accidentally Sourced .Bash_history
00:34 Accepted Answer Score 30
00:48 Answer 2 Score 15
01:09 Thank you

--

Full question
https://superuser.com/questions/609564/a...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#bash

#avk47



ACCEPTED ANSWER

Score 30


If it's a local machine, start a new terminal and kill the shell in question.

If it's a remote machine, ssh in and kill the shell in question.




ANSWER 2

Score 15


You can hit Ctrl+Z or start a subshell using :!bash, and then kill the shell. Specific steps:

Ctrl+Z
kill -9 $$

:suspend (or acceptable abbreviations thereof) may function equivalently to Ctrl+Z.