When .bashrc is sourced, my terminal immediately closed - I pinpointed it to ~/.bashrc - what's the best way to debug this? Should echo every line to another file? Is there a log I can look to?
It looks like this line is causing the terminal window to close:
ssh-add ~/.ssh/xyz/oresoftware
that file path doesn't exist, so I change it to something that exists:
ssh-add ~/.ssh/oresoftware
but would ssh-add
close my terminal window?
.bashrc
. (1) What doestype ssh-add
report? (2) Let’s assume that the suspiciousssh-add
command is on line 42 of your.bashrc
. Copy lines 1-41 of.bashrc
to.bashrc41
andsource
that. Does your terminal close? If it does, the problem occurs before thessh-add
. (3) Otherwise, dotype ssh-add
again. (4) Then typessh-add ~/.ssh/xyz/oresoftware
. Now does your terminal close? Then thessh-add
is causing it. (5) If step 4 didn’t kill your terminal, copy lines 1-42 of.bashrc
to.bashrc42
andsource
that. What happens? – G-Man Says 'Reinstate Monica' Nov 25 '17 at 06:29