Can Ubuntu 24.04 function without a battery? [duplicate]

For context; it's been a little over two years since my HP laptop's original battery met its end, after almost 3 years of usage. I initially planned to just replace the battery, but after just 6 months the replacement also gave up even though I bought it from an authorized HP provider. So, I decided to give up on buying new batteries and, running on Windows 10, I instead keep it running with the…