How to extend your laptop battery lifespan on Linux Ubuntu/Debian

As computers become more powerful and more efficient, they rapidly drain their batteries because they consume more electricity. While this might depend on the number of running applications, laptop moans are mainly caused by battery life especially when they are not plugged in throughout the day.