Although there are no national programs that distribute smoke detectors or other types of fire alarms, state and city governments sometimes offer free smoke detectors and batteries. Most areas offer free educational material about fire safety, including smoke detector information.
Almost all building codes require smoke detectors, and smoke detectors are often required in bedrooms and above staircases. Because these smoke detectors are required, renters generally have a right to have them installed for free, so landlords are generally required to install and maintain them. Renters who don't have smoke detectors or who need replacements can generally contact ask their landlords to inspect and replace smoke detectors.
Homeowners are typically required to install their own smoke detectors, but local programs sometimes offer discounts or even free units. The New York City Fire Department, for example, offered free smoke detectors and batteries in 2013, and a city politician spearheaded a program in 2015 that offered free smoke detectors in response to local fire-related deaths. Finding these programs requires following the news and looking for alerts, but it might be worth giving the fire department and government offices a call.
Other companies might offer free smoke detectors as well. Airbnb, for example, offered free smoke and carbon monoxide detectors to some of its clients in 2014 to help ensure that local occupancy codes were being met.