The U.S. incarcerates more people per capita than any other nation. In 2016, some 2.3 million adult and juvenile Americans were imprisoned in a jail, a prison or a federal detention center. Safely surviving life in a correctional facility requires a series of adjustments in thinking and behavior—you’re in a confined space now, and surrounded by predators. Leo Carroll, a professor of sociology and former correctional officer who teaches policing, punishment and corrections, and criminal justice policy, offers this survival guide.

Get a lawyer. If you’re in jail awaiting trial, don’t talk to the police—at all. Police are legally allowed to lie to suspects during interrogations, and have many methods of soliciting damaging statements. “In some cases people have been sent to prison for very long sentences when later evidence—such as DNA—has shown them to be innocent,” Carroll says.

Put on your prison mask. Don’t show fear, and don’t confide anything personal. “There are people looking to exploit others,” Carroll says. “If someone wants to be your friend, that’s a danger sign that they are more likely to be a predator.”

Keep your distance from the COs. Your stock in the prison population will plummet if you appear to be friendly with the guards. Comply with what they tell you, but don’t be eager to do it. Carroll recalls one inmate who stood for the daily count, but with his back to the cell door—or wore his prison uniform with some small alteration. “It’s a little thing—you don’t control all of me,” Carroll says. “That’s a message to the correctional officers and a message to other inmates.”   

Make yourself useful. Find a niche that takes advantage of your education and skills and makes them available to other inmates. Many of your peers can’t read or write. Write letters for them or get a job as a clerk in the law library. This can keep you busy—and safe.

Don’t join a gang if you can help it. This isn’t a problem in some prison systems. But in others, guards only control the perimeter and the use of force, and gangs run everything else. If the gang tells you to do something, you will have to do it, or it will be done to you.

Avoid conspicuous consumption. People can put money into a prison store account that will allow you to buy yourself some goodies. Carroll advises: “Don’t do it to excess. You can get ripped off. Or, you can find yourself having to pay tribute to someone.”