Find the eigenvalues and eigenvectors of the matrix with all diagonal elements as $d$ and rest $1$

An obvious eigenvector is $(1,\ldots,1)^T$ with eigenvalue $d+n-1$. Other almost as obvious eigenvectors are $(1,0,\ldots,0,-1,0,\ldots,0)^T$ with eigenvalue $d-1$. Since this gives $n$ linearly independant eigenvectors, we are done. (In fact, any vector orthogonal to $(1,\ldots,1)^T$ is an eigenvector with eigenvalue $d-1$).


Denote the matrix as $M$.
Let $J$ be the matrix with all entries $1$.
The matrix $J$ has rank $1$ therefore only one non zero eigenvalue which is $n$ with corresponding eigenvector $(1,1,\ldots,1)^T$ (what are the eigenvectors corresponding to the eigenvalue(s) $0$?).

Now note that $M=J+(d-1)I_n$ and that for any matrix $A\in\mathbb R^{n\times n}, \ x\in\mathbb R^n$ and $r\in\mathbb R$ if $Ax=\lambda x $ then $(A+rI_n)x=(\lambda+r)x$.