Since the beginning of twentieth century, confinement of atom, molecule and plasma inside impenetrable sharp (hard) and smooth (soft) cavities has been studied with utmost interest. Physically, such situations introduce the trapping of a quantum system under high pressure. The internal pressure (Pn,ℓ) of the system under such multi-megabar external pressure has not yet been explored. Also, there is a lack of Hellmann-Feynman theorem (HFT) in such a scenario, which is essential to derive a concrete analytical expression of Pn,ℓunder stressed condition. Here using a scaling concept we provide a general HFT in terms of expectation values of total energy, potential and kinetic energy of a given confined system. Change in boundary condition (from smooth to sharp and vice versa) does not affect the this. Applying this proposed HFT, a closed-form expression of Pn,ℓ and d2d ER2 has been obtained for confined and shell-confined quantum systems. Based on this Pn,ℓ, several virial-like equations are also modelled. This HFT and Pn,ℓ are demonstrated for one and many-electron atoms, plasmas and molecules using both analytical and numerical methods. Its applicability in several other confined systems has been discussed from simple arguments.