{"id":1089,"date":"2024-08-27T02:03:43","date_gmt":"2024-08-27T02:03:43","guid":{"rendered":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/"},"modified":"2024-12-10T05:02:05","modified_gmt":"2024-12-10T05:02:05","slug":"how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli","status":"publish","type":"post","link":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/","title":{"rendered":"How to Check Your Laptop&#8217;s Battery Health in Ubuntu Using the CLI"},"content":{"rendered":"<p><p><strong>Want to check your battery health in Ubuntu from the command-line without any additional installations?<\/strong><\/p>\n<\/p>\n<p><p>If you&#8217;re running Ubuntu on a laptop, you likely monitor your battery level from the top bar (I always enable <a href=\"https:\/\/www.omgubuntu.co.uk\/2023\/10\/show-battery-percentage-ubuntu-panel\" rel=\"nofollow noopener\" target=\"_blank\">battery percentage display in the top bar<\/a> right after installing the OS), and switch to the <em>Settings &gt; Power<\/em> panel for more detailed info when needed.<\/p>\n<\/p>\n<p><p>However, while this is sufficient for seeing your current battery level, it doesn&#8217;t provide any information on the health of your battery.<\/p>\n<\/p>\n<p><p>Fortunately, Ubuntu comes with the \u2018Power Statistics\u2019 tool. This utility offers a comprehensive view of your battery\u2019s charge cycle, usage statistics, and overall health.<\/p>\n<\/p>\n<p><p>For those who frequently use the command line, accessing battery status through the CLI can be incredibly useful.<\/p>\n<\/p>\n<p><p>Observing that your laptop&#8217;s battery drains quicker and needs more frequent recharging could be attributed to various factors including CPU spikes, high system loads, background processes, incorrect settings, or even too many open browser tabs.<\/p>\n<\/p>\n<p><p>Alternatively, the issue might be with the battery itself. Over time, batteries degrade; they have limited life spans. There&#8217;s an old belief that fully discharging and then recharging a battery diminishes its capacity to hold charge \u2014 though it&#8217;s unclear if this is still considered true.<\/p>\n<\/p>\n<p><p>Regardless, if you&#8217;re looking to evaluate the health of your battery on Ubuntu, this can easily be done via a simple command line prompt, assuming you know your battery&#8217;s label. For clarity, we&#8217;ll use two commands in this guide.<\/p>\n<\/p>\n<p><h2>Find Battery Capacity &amp; Cycle Count from CLI<\/h2>\n<\/p>\n<p><p>Using <code>upower<\/code>, we can check the battery vendor, model number, and capacity information, including current max capacity, original max capacity, cycle count, time to empty, and how much power is being drawn from the battery at the time the command is run.<\/p>\n<\/p>\n<ol>\n<li>Open a new <em>Terminal<\/em> window.<\/li>\n<li>Enter the command <code>upower --enumerate<\/code>.<\/li>\n<li>Locate and copy the output path for your battery, typically ending in \u2018_BAT0\u2019.<\/li>\n<li>Input <code>upower -i<\/code> followed by a space, then insert the path you copied.<\/li>\n<\/ol>\n<p><p>The path mentioned is commonly found in many laptops, though it might be different specific to your device.<\/p>\n<\/p>\n<p><p>As shown in the example, running the first command displays the battery path as <code>\/org\/freedesktop\/UPower\/devices\/battery_BAT0<\/code>. The path is then used with the second command as <code>upower -I \/org\/freedesktop\/UPower\/devices\/battery_BAT0<\/code>.<\/p>\n<\/p>\n<p><p>Reviewing the statistics provided offers insights into your battery&#8217;s health and performance.<\/p>\n<\/p>\n<p><p>The <code>energy-full<\/code> attribute represents the current maximum capacity your battery can store, while the <code>energy-full-design<\/code> attribute shows the capacity your battery had when it was new. Below that, the <code>capacity<\/code> attribute provides a percentage that represents how the current capacity compares to the original capacity.<\/p>\n<\/p>\n<p><p>In an example, originally a battery had a capacity of 53.9 Wh. Over time, this has decreased to 38.8 Wh, which means the current capacity is only 71.9% of the original capacity. This depreciation is considered decent for a laptop that is five years old.<\/p>\n<\/p>\n<p><p>Additionally, the <code>charge-cycles<\/code> attribute informs you about the total number of times the battery has been charged from completely drained to full. For instance, in one example, the battery was charged 194 times.<\/p>\n<\/p>\n<p><h3>GUI options are available as well<\/h3>\n<\/p>\n<p><p>And that\u2019s how to check your battery health, capacity, and cycle count from the command line in Ubuntu using upower.<\/p>\n<p>There are plenty of other ways to get battery information on Ubuntu, and the included <em>Power Statistics<\/em> app is more user-friendly. But if you prefer the command line, and you your info in one clean printout, then upower is worth knowing about. <\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to check your battery health in Ubuntu from the command-line without any additional installations? If you&#8217;re running Ubuntu on a laptop, you likely monitor your battery level from the top bar (I always enable battery percentage display in the top bar right after installing the OS), and switch to the Settings &gt; Power panel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1090,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1089","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Check Laptop Battery Health in Ubuntu Using CLI | ServerHost<\/title>\n<meta name=\"description\" content=\"Learn how to check your laptop\u2019s battery health in Ubuntu using the command line interface, helping to ensure optimal battery performance and longevity.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Check Laptop Battery Health in Ubuntu Using CLI | ServerHost\" \/>\n<meta property=\"og:description\" content=\"Learn how to check your laptop\u2019s battery health in Ubuntu using the command line interface, helping to ensure optimal battery performance and longevity.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"ServerHost Hosting Solutions Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-27T02:03:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-10T05:02:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/\",\"url\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/\",\"name\":\"Check Laptop Battery Health in Ubuntu Using CLI | ServerHost\",\"isPartOf\":{\"@id\":\"https:\/\/serverhost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp\",\"datePublished\":\"2024-08-27T02:03:43+00:00\",\"dateModified\":\"2024-12-10T05:02:05+00:00\",\"author\":{\"@id\":\"https:\/\/serverhost.com\/blog\/#\/schema\/person\/535ebc9c42672d8f79ad3ee8ea563d66\"},\"description\":\"Learn how to check your laptop\u2019s battery health in Ubuntu using the command line interface, helping to ensure optimal battery performance and longevity.\",\"breadcrumb\":{\"@id\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#primaryimage\",\"url\":\"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp\",\"contentUrl\":\"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp\",\"width\":350,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/serverhost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check Your Laptop&#8217;s Battery Health in Ubuntu Using the CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/serverhost.com\/blog\/#website\",\"url\":\"https:\/\/serverhost.com\/blog\/\",\"name\":\"ServerHost Hosting Solutions Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/serverhost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/serverhost.com\/blog\/#\/schema\/person\/535ebc9c42672d8f79ad3ee8ea563d66\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/serverhost.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b8e5973018461f98bcdda40e69a0a7ae6548c079e5e7a1a0c8b40c0738e0fb52?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b8e5973018461f98bcdda40e69a0a7ae6548c079e5e7a1a0c8b40c0738e0fb52?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/serverhost.com\/blog\"],\"url\":\"https:\/\/serverhost.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Check Laptop Battery Health in Ubuntu Using CLI | ServerHost","description":"Learn how to check your laptop\u2019s battery health in Ubuntu using the command line interface, helping to ensure optimal battery performance and longevity.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/","og_locale":"en_US","og_type":"article","og_title":"Check Laptop Battery Health in Ubuntu Using CLI | ServerHost","og_description":"Learn how to check your laptop\u2019s battery health in Ubuntu using the command line interface, helping to ensure optimal battery performance and longevity.","og_url":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/","og_site_name":"ServerHost Hosting Solutions Blog","article_published_time":"2024-08-27T02:03:43+00:00","article_modified_time":"2024-12-10T05:02:05+00:00","og_image":[{"width":350,"height":200,"url":"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/","url":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/","name":"Check Laptop Battery Health in Ubuntu Using CLI | ServerHost","isPartOf":{"@id":"https:\/\/serverhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#primaryimage"},"image":{"@id":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp","datePublished":"2024-08-27T02:03:43+00:00","dateModified":"2024-12-10T05:02:05+00:00","author":{"@id":"https:\/\/serverhost.com\/blog\/#\/schema\/person\/535ebc9c42672d8f79ad3ee8ea563d66"},"description":"Learn how to check your laptop\u2019s battery health in Ubuntu using the command line interface, helping to ensure optimal battery performance and longevity.","breadcrumb":{"@id":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#primaryimage","url":"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp","contentUrl":"https:\/\/serverhost.com\/blog\/wp-content\/uploads\/2024\/08\/003d0a3aca681e91afba8c144723e480.webp","width":350,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/serverhost.com\/blog\/how-to-check-your-laptops-battery-health-in-ubuntu-using-the-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/serverhost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Check Your Laptop&#8217;s Battery Health in Ubuntu Using the CLI"}]},{"@type":"WebSite","@id":"https:\/\/serverhost.com\/blog\/#website","url":"https:\/\/serverhost.com\/blog\/","name":"ServerHost Hosting Solutions Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/serverhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/serverhost.com\/blog\/#\/schema\/person\/535ebc9c42672d8f79ad3ee8ea563d66","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/serverhost.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b8e5973018461f98bcdda40e69a0a7ae6548c079e5e7a1a0c8b40c0738e0fb52?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b8e5973018461f98bcdda40e69a0a7ae6548c079e5e7a1a0c8b40c0738e0fb52?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/serverhost.com\/blog"],"url":"https:\/\/serverhost.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/posts\/1089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/comments?post=1089"}],"version-history":[{"count":1,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/posts\/1089\/revisions"}],"predecessor-version":[{"id":1667,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/posts\/1089\/revisions\/1667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/media\/1090"}],"wp:attachment":[{"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/media?parent=1089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/categories?post=1089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverhost.com\/blog\/wp-json\/wp\/v2\/tags?post=1089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}