* "Perfect" alignment: All eight planets in our solar system *perfectly* aligned in a straight line is impossible. They have different orbital planes and speeds.
* Close alignment: Planets can appear close together in the sky from our perspective on Earth. This is called a planetary conjunction.
* Frequency of conjunctions: Planetary conjunctions happen relatively frequently, and the specific planets involved vary.
So, answering your question is tricky:
* There hasn't been a *perfect* planetary alignment in our solar system's history.
* There are frequent *close* alignments (conjunctions), and these happen on different timescales depending on the planets involved.
To get a better idea, you'll need to specify:
* Which planets are you interested in? The more planets involved, the rarer the event.
* What level of "closeness" are you looking for? A wide conjunction is more common than a tight one.
For example:
* The last time the five brightest planets (Mercury, Venus, Mars, Jupiter, and Saturn) were visible together in the night sky was in 2004.
* A conjunction of Jupiter and Saturn occurred in December 2020, which was particularly close and was visible to the naked eye.
To find more specific information, search for "planetary conjunctions" and specify the planets and time period you're interested in.