Absolutely. They are exactly the same, run the same core operating system, etc. The differences are mainly in the physical form, size of components, and power consumption. I have noticed that sometimes people differentiate by calling a desktop computer a “PC” and then calling the portable version a “laptop”.