Nilpotent and cyclic quotient group implies abelian I'm stuck on the follow question, and honestly, I cannot think of a way to deal with it. Does anyone have any suggestions?  Any hints would be very appreciated! Thanks

Suppose that $G$ is a nilpotent group and that $G/G'$ is a cyclic
  group, where $G'$ denotes the commutator subgroup of $G$. Show that
  $G$ is abelian.

Intuition:  My idea is to do something along the line of induction on the length of the upper central series that $G$ has, and showing that, if $1 =G_n \leq \dots \leq G_2=G' \leq G_1=G $, then $1=G_n = \dots = G'$. 
 A: You might use the following: a group $G$ is nilpotent if and only if $G' \subseteq \Phi(G)$. Here, $\Phi(G)$ is the Frattini subgroup of $G$, being the intersection of all maximal subgroups of $G$ ($\Phi(G)=G$ if $G$ does not have any maximal subgroups). $\Phi(G)$ is a characteristic subgroup. For a proof of the aforementioned facts see for example here. 
Also, $\Phi(G)$ comprises of so-called non-generators: they can always be removed from a set of generators for $G$
without affecting the property of generating $G$. 
Now, weaponed with this knowledge, back to your post: if $G/G'$ is cyclic, then, since $G' \subseteq \Phi(G)$, we have that $G/\Phi(G)$ is cyclic, implying $G=\Phi(G)\langle x \rangle$ for some $x \in G$. But $\Phi(G)$ are non-generators, so, we get $G=\langle x \rangle$, whence $G$ is cyclic and in particular abelian.
Another way to prove this is as follows and is independent from the fact that $G$ is finite or not (see remark of prof. Holt below, thanks). To this end we need a lemma.
Lemma Let $G$ be a group with subgroups $H$ and normal subgroup $N$, such that $G=HN$. Then $G'=H'[G,N]$.
Proof (sketch) It is clear that $H'[H,N] \subseteq G'$. Hence we have to prove the reverse inclusion. We claim that $H'[G,N]$ is a normal subgroup of $G$: for $[G,N] \unlhd G$, and $H$ normalizes $H'$, so it suffices to show that $N$ normalizes $H'$, since $G=HN$. But if $n \in N$ and $h \in H'$, then $n^{-1}hn=h[h,n] \in H'[H',N] \subseteq H'[G,N]$, proving the claim. The  proof can now be finished by calculating a commutator $\overline{[h_1n_1,h_2n_2]}$ in the quotient group $G/H'[G,N]$, which will be equal to $\overline{1}$.
Now assume that $G$ is nilpotent and $G/G'$ is cyclic. Then there is an $g \in G$ such that $G/G'=\langle \overline{g} \rangle$. Put $H=\langle g \rangle$, then it follows that $G=HG'$. The Lemma now implies that $\gamma_2(G)=H'\gamma_3(G)=\gamma_3(G)$. However, $G$ is nilpotent, so, the lower central series can only stabilize if $\gamma_2(G)=\gamma_3(G)=1$, whence $G$ is abelian.
A: If $G$ has class $1$ or  $2$, then $G' \le Z(G)$ so $G/Z(G)$ is cyclic and $G$ is abelian.
Otherwise, we can apply induction to $G/Z(G)$ and deduce that $G/Z(G)$ is abelian, but then $G$ has class at most $2$. Note that this argument does not assume that $G$ is finite.
