A solenoid that is carrying current has magnetic field lines similar to a bar magnet.
Magnetic field due to a current-carrying solenoid is similar to the magnetic field of a: