Make a coil from the wire
A solenoid is a coil of wire. The magnetic fields from its turns combine, making a strong field inside. Compared with a single straight wire carrying the same current, the turns reinforce the field through the coil. The pattern outside resembles that of a bar magnet, with north and south ends. A solenoid only has this current-produced field while current flows.