  We give a geometric classification of complex $n$-dimensional $2$-step
nilpotent (all, commutative and anticommutative) algebras. Namely, has been
found the number of irreducible components and their dimensions. As a
corollary, we have a geometric classification of complex $5$-dimensional
nilpotent associative algebras. In particular, it has been proven that this
variety has $14$ irreducible components and $9$ rigid algebras.
