Smoking in all NSW prisons is set to be banned within 18 months after the state's prison boss expressed his concern about the health effects lighting up in jails is having on staff and inmates.

But the prison officers union said NSW risks becoming the last state to outlaw cigarettes in jails and has written to the government for funding to help inmates and staff shake the habit.

Corrective Services Commissioner Peter Severin is pushing for the entire grounds of all NSW jails to become smoke-free environments. Credit:Edwina Pickles

Britain's Justice Ministry announced plans last week for a pilot scheme to monitor how inmates react to a similar move there. If the trial is successful, the ban would be rolled out across all prisons.

Two NSW prisons, at Lithgow and Cessnock, have run trials banning smoking within cells and other buildings, but inmates and staff can still smoke outdoors.