I am studying with Jech's book. He claims that
The existence of inaccessible cardinals is not provable in $\mathsf{ZFC}$. Moreover, it cannot be shown that the existence of inaccessible cardinals is consistent with $\mathsf{ZFC}$.
And he gives the proof for the second part:
To prove the second part, assume that it can be shown that the existence of inaccessible cardinals is consistent with $\mathsf{ZFC}$; in other words, we assume if $\mathsf{ZFC}$ is consistent, then so is $\mathsf{ZFC} + \mathsf{I}$ where $\mathsf{I}$ is the statement “there is an inaccessible cardinal.” We naturally assume that $\mathsf{ZFC}$ is consistent. Since $\mathsf{I}$ is consistent with $\mathsf{ZFC}$, we conclude that $\mathsf{ZFC} + \mathsf{I}$ is consistent. It is provable in $\mathsf{ZFC} + \mathsf{I}$ that there is a model of $\mathsf{ZFC}$. Thus the sentence “$\mathsf{ZFC}$ is consistent” is provable in $\mathsf{ZFC} + \mathsf{I}$. However, we have assumed that “$\mathsf{I}$ is consistent with $\mathsf{ZFC}$” is provable, and so “$\mathsf{ZFC} + \mathsf{I}$ is consistent” is provable in $\mathsf{ZFC} + \mathsf{I}$. This contradicts Gödel’s Second Incompleteness Theorem.
And he adds
“it cannot be shown” means: It cannot be shown by methods formalizable in $\mathsf{ZFC}$.
So his proof claims that if we assume that $\mathsf{ZFC}$ is consistent, $\mathsf{ZFC} \nvdash \mathrm{Con}(\mathsf{ZFC}) \to \mathrm{Con}(\mathsf{ZFC} + \mathsf{I})$, right? I am confused here. Can we claim that $\mathsf{ZFC} + \mathsf{I}$ is consistent in the metatheoretical sense provided that a consistent theory($\mathsf{ZFC}$) proves that if itself is consistent, then $\mathsf{ZFC} + \mathsf{I}$ is consistent? If $\mathsf{ZFC} \vdash \neg\mathrm{Con}(\mathsf{ZFC})$ (then $\mathsf{ZFC}$ is not 1-consistent) still $\mathsf{ZFC} \vdash \mathrm{Con}(\mathsf{ZFC}) \to \mathrm{Con}(\mathsf{ZFC} + \mathsf{I})$ holds, but then since $\mathsf{ZFC} + \mathsf{I} \vdash \mathrm{Con}(\mathsf{ZFC})$, $\mathsf{ZFC} + \mathsf{I}$ is inconsistent.
After writing this answer, I realized that spaceisdarkgreen already explained this in the comment thread above; if they leave an answer, I'll delete this one.
Yes, there's an issue here. What we really have is the following:
Note that the latter is intermediate between $Con(\mathsf{ZFC})$ and $\Sigma_1$-$Sound(\mathsf{ZFC})$ (the latter of which in turn is a very weak fragment of arithmetical soundness).
The $\neg 2\rightarrow \neg 1$ direction is exactly what you've observed: if $\mathsf{ZFC}\vdash \neg Con(\mathsf{ZFC})$, then $\mathsf{ZFC}\vdash Con(\mathsf{ZFC})\rightarrow\varphi$ for every sentence $\varphi$.
Now we want to show $\neg1\rightarrow\neg 2$. This basically parallels Jech's argument. There are three steps, each of which is provable in $\mathsf{ZFC}$ (or indeed much less):
Monotonicity. Suppose $\mathsf{ZFC}\vdash Con(\mathsf{ZFC})\rightarrow Con(\mathsf{ZFC+I})$. Then a fortiori we have $\mathsf{ZFC+I}\vdash Con(\mathsf{ZFC})\rightarrow Con(\mathsf{ZFC+I})$, and so $\mathsf{ZFC+I}\vdash Con(\mathsf{ZFC+I})$.
Godel's second incompleteness theorem. From this and the previous bulletpoint we get $\neg Con(\mathsf{ZFC+I})$.
$\Sigma_1$-completeness. The previous bulletpoint implies $\mathsf{ZFC}\vdash\neg Con(\mathsf{ZFC+I})$. But now combining this with our original hypothesis $\neg 1$, we get $$\mathsf{ZFC}\vdash \neg Con(\mathsf{ZFC+I})\wedge[Con(\mathsf{ZFC})\rightarrow Con(\mathsf{ZFC+I})],$$ which in turn yields $$\mathsf{ZFC}\vdash\neg Con(\mathsf{ZFC})$$ as desired.
$^1$Mathematical limbo - how low can we go?
As the argument above shows, we really just need our metatheory to prove three things:
Monotonicity of $\vdash$.
Godel's second incompleteness theorem.
The $\Sigma_1$-completeness of $\mathsf{ZFC}$.
The first is basically trivial (e.g. even Robinson arithmetic does that), while this fascinating paper of Visser mentions $\mathsf{EA}$ as an upper bound for the third ($\mathsf{EA}$ is incredibly weak, as that same paper demonstrates). Meanwhile, I believe - but don't have a source for the claim - that $\mathsf{EA}$ also proves GSIT, which would make $\mathsf{EA}$ in fact a sufficient metatheory!
However, going all the way down to $\mathsf{EA}$ - if we even can - is really just showing off. For almost all purposes it's enough to observe that $I\Sigma_1$ (a weak fragment of $\mathsf{PA}$) is enough. $I\Sigma_1$ has a number of nice properties which in my opinion do make it a better stopping point than the more-famous $\mathsf{PA}$: basically, it's the weakest "natural" theory capable of "naturally" developing basic computability theory (for example, the provably total functions of $I\Sigma_1$ are exactly the primitive recursive functions). It's also finitely axiomatizable, which is sometimes quite useful. And finally, it's the first-order part of $\mathsf{RCA_0}$, meaning that a reduction to $I\Sigma_1$ fits quite nicely in the program of reverse mathematics.