You can use the following
Claim: A commutative unitary ring is local iff the set of non-unit elements is an ideal, and in this case this is the unique maximal ideal.
Now, in $\,k[x]/(x^n):=\{f(x)+(x^n)\;\;;\;\;f(x)\in K[x]\,\,,\,\deg(f) , an element in a non-unit iff $\,f(0)=a_0= 0\,$ , with $\,a_0=$ the free coefficient of $\,f(x)\,$, of course.
Thus, we can characterize the non-units in $\,k[x]/(x^n)\,$ as those represented by polynomials of degree less than $\,n\,$ and with free coefficient zero, i.e. the set of elements $\,M:=\{f(x)+(x^n)\in k[x]/(x^n)\;\;;\;\;f(x)=xg(x)\,\,,\,\,g(x)\in k[x]\,\,,\deg (g)
Well, now check the above set fulfills the claim's conditions.
Note: I'm assuming $\,k\,$ above is a field, but if it is a general commutative unitary ring the corrections to the characterization of unit elements are minor, though important. About the claim being true in this general case: I'm not quite sure right now.