We make a systematical diffusion Monte Carlo (DMC) calculation for all ground state baryons in two confinement scenarios, the pairwise confinement and the three-body flux-tube confinement. With the baryons as an example, we illustrate a feasible procedure to investigate the few-quark states with possible few-body confinement mechanisms, which can be extended to the multiquark states easily. For each baryon, we extract the mass, mean-square radius, charge radius, and the quark distributions. To determine the baryon charge radii, we include the constituent quark size effect, which is fixed by the experimental and lattice QCD results. Our results show that both two-body and three-body confinement mechanisms can give a good description of the experimental data if the parameters are chosen properly. In the flux-tube confinement, introducing different tension parameters for the baryons and mesons are necessary, specifically, σY = 0.9204σ Q Q. The lesson from the calculation of the nucleon mass with the DMC method is that the improper pre-assignment of the channels may prevent us from obtaining the real ground state. With this experience, we obtain the real ground state (the ηcηc threshold with the di-meson configuration) of the cccc system with J P C = 0 ++ starting from the diquarkantidiquark spin-color channels alone, which is hard to achieve in the variational method and was not obtained in the previous DMC calculations.