According to the Bushido Shoshinshu (the Code of the Samurai), a samurai was supposed to commit seppuku (also "hara kiri" — ritual suicide) upon the loss of his master. One who chose not to honor the code was "on his own" and was meant to suffer great shame. The undesirability of rōnin status was mainly a discrimination imposed by other samurai and by daimyo, the feudal lords.
Like other samurai, rōnin wore their two swords. Rōnin used a variety of other weapons as well. Some rōnin — usually those who lacked money — would carry a bō (staff around 5 to 6 ft) or jō (smaller staff or walking stick around 3 to 5 ft) or a yumi (bow). Most weapons would reflect the ryū or martial arts school they came from, if they were students.
During the Edo period, with the shogunate's rigid class system and laws, the number of rōnin greatly increased. Confiscation of fiefs during the rule of the third Tokugawa shogun Iemitsu resulted in an especially large increase of rōnin. During previous ages, samurai were able to move between masters and even between occupations. They would also marry between classes. However, during the Edo period, samurai were restricted, and were above all forbidden to become employed by another master without their previous master's permission.
Because the former samurai could not legally take up a new trade, or because of pride were loath to do so, many rōnin looked for other ways to make a living with their swords. Those rōnin who desired steady, legal employment became mercenaries that guarded trade caravans, or bodyguards for wealthy merchants. Many other rōnin became criminals, operating as bandits and highwaymen, or joining organized crime in towns and cities. Rōnin were known to operate, or serve as hired muscle for gangs that ran gambling rings, brothels, protection rackets, and other similar activities. Many were petty thieves and muggers. The criminal segment gave the rōnin of the Edo period a persistent reputation of disgrace, with the image of thugs, bullies, cutthroats, and wandering vagrants.