I did 2.5 years in the Fed, saw 5 county jails and 3 Fed prisons in that time.
Big difference between jail and prison for sure. Jail has it's own stresses, dealing with people waiting to be sentenced, waiting to go to trial, waiting and waiting and waiting. You have people come in on DUI's, crying about spending 3 hours in jail, <--- this behavior is a no-no by the way. DO NOT BITCH ABOUT YOUR TIME, BECAUSE THERE IS SOMEONE NEAR YOU WHO HAS IT MUCH WORSE THAN YOU.
Show respect, don't poke your nose where it doesn't belong, and you will be ok. Don't give off the presence of weakness, because people will phone-check you or chin-check you for the hell of it. Don't act hard, but just show confidence not arrogance, because believe me when I tell you, they will deal you an entire humble pie.
Prison is it's own beast, because you now have people who have settled into their lifestyle for their time away. That means you find friends who are similar to you. If you are in a gang, find your gang peeps. If you are a person like me, who just wants to go home, then hang out with people like that. Don't talk shit about anyone, pretend that there is always someone listening, because there usually is.
Be polite, show respect and courtesy. If you get into a fight, no guards are going to break it up. They will wait til someone is beat up or dead, then haul away the aftermath. If you talk shit to a guard, you run the risk of getting tuned up, and before you think you can go screaming to your lawyer, you will be deemed as being resistive/combative, which gives the cops the authority to beat the shit out of you. Remember, you are a felon, your word of mouth doesn't mean shit anymore.
Watch where you step, who you step with, watch your mouth, and you will be going home. I went from a minimum security to a medium-high security, which was a huge shock. The minimum was closing due to budget cuts, so the next closest place to home was the med-high at Terminal Island. No fun people, that shit looked like Castle Greyskull from He-Man.