Skip to content

Both.org

News, Opinion, Tutorials, and Community for Linux Users and SysAdmins

Primary Menu
  • About Us
  • Computers 101
    • Hardware 101
    • Operating Systems 101
  • Linux
    • Why I use Linux
    • The real reason we use Linux
  • My Linux Books
    • systemd for Linux SysAdmins
    • Using and Administering Linux – Zero to SysAdmin: 2nd Edition
    • The Linux Philosophy for SysAdmins
    • Linux for Small Business Owners
    • Errata
      • Errata for The Linux Philosophy for SysAdmins
      • Errata for Using and Administering Linux — 1st Edition
      • Errata for Using and Administering Linux — 2nd Edition
  • Open Source Resources
    • What is Open Source?
    • What is Linux?
    • What is Open Source Software?
    • The Open Source Way
  • Write for us
    • Submission and Style guide
    • Advertising statement
  • Downloads
  • Home
  • Getting the most out of your NVME drives
  • Command Line
  • Linux

Getting the most out of your NVME drives

Don Watkins December 15, 2023 3 minutes read
2023-12-15-072423

My laptops are equipped with NVMe drives, which impress me with their incredible speed. I’m delighted by the lightning-fast boot times and seamless data read and write operations without noticeable delays.

As my fascination grew, I explored the technology behind this blazing-fast storage. After a bit of research, I discovered that NVMe drives offer exceptional speed and consume less power than traditional SSD drives using SATA connections. The efficiency intrigued me, but I wanted to delve deeper into the specifics of my NVMe drives and compare them with other options. I had questions about securely erasing the drive and ensuring its integrity.

A quick internet search led me to the perfect solution—an open-source project called “nvme-cli.” This collection of tools provides comprehensive management capabilities for NVMe drives, offering me the functionality I sought and more.

You can install ‘nvme-cli’ on your Linux system easily from the command line

Install nvme-cli

You can install nvme-cli from your distribution’s package manager. For instance, on Fedora, CentOS, or similar:

$ sudo dnf install nvme-cli

On Debian, Mint, Elementary, and similar:

$ sudo apt install nvme-cli

Getting help

After installing nvme-cli for my distribution, I wanted to explore my drive. There’s no man page for nvme-cli, but you can get lots of help by entering 'nvme help':

don@pop-os:~$ nvme help
nvme-1.16
usage: nvme <command> [<device>] [<args>]

The '<device>' may be either an NVMe character device (ex: /dev/nvme0) or an
nvme block device (ex: /dev/nvme0n1).

The sudo nvme list command lists all NVMe devices and namespaces on your machine. I used it and found an NVMe drive at /dev/nvme0n1. Here is the output:

don@pop-os:~$ sudo nvme list
[sudo] password for don: 
Node                  SN                   Model                                    Namespace Usage                      Format           FW Rev  
--------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          ASB3N553810103J14    SK hynix PC711 HFS001TDE9X073N           1           1.02  TB /   1.02  TB    512   B +  0 B   HPS0    

Drive information

You can get even more information about the drive and the features it supports by using the id-ctrl subcommand:

don@pop-os:~$ sudo nvme id-ctrl /dev/nvme0n1
NVME Identify Controller:
vid       : 0x1c5c
ssvid     : 0x1c5c
sn        : ASB3N553810103J14   
mn        : SK hynix PC711 HFS001TDE9X073N          
fr        : HPS0    
rab       : 3
ieee      : ace42e
cmic      : 0
mdts      : 6

Drive health

You can read about the overall health of a drive with the smart-log subcommand

don@pop-os:~$ sudo nvme smart-log  /dev/nvme0n1
Smart Log for NVME device:nvme0n1 namespace-id:ffffffff
critical_warning            : 0
temperature                : 29 C (302 Kelvin)
available_spare                : 100%
available_spare_threshold        : 5%
percentage_used                : 0%
endurance group critical warning summary: 0
data_units_read                : 8,524,708
data_units_written            : 5,777,269

Format your drive

Caution must be exercised when using ‘nvme-cli format’ an NVMe drive, as this action will result in the complete erasure of all data on the drive. Therefore, it is crucial to back up any essential data before proceeding with the formatting process to avoid permanent data loss

sudo nvme format /dev/nvme0nx

Securely erase your drive

When the time comes to sell or dispose of your NVMe computer, securely erasing the drive becomes a priority. As with the formatting process, it is essential to heed the same warnings here: make sure to back up any crucial data before initiating this command, as it will erase all the data on the drive

sudo nvme sanitize /dev/nvme0nx

Nvme-cli is openly licensed.

Tags: command line Linux nvme SysAdmin

Post navigation

Previous: Cronopete: A graphical backup utility for Linux
Next: Understanding the Digital World – A Book Review

Related Stories

programming_code_keyboard_orange_hands
  • Linux
  • Programming

Converting tabs to spaces

Jim Hall May 20, 2026
gears-01
  • Command Line
  • FreeDOS

Customize your FreeDOS with FDCONFIG.SYS

Jim Hall May 18, 2026
Photo by Scott Rodgerson on Unsplash
  • Cloud
  • Digital sovereignty
  • Linux
  • Open Source
  • Security

Digital sovereignty

Seth Kenlon May 15, 2026

Random Quote

The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

— Douglas W. Jones

Why I’ve Never Used Windows

On February 12 I gave a presentation at the Triangle Linux Users Group (TriLUG) about why I use Linux and why I’ve never used Windows.

Here’s the link to the video: https://www.youtube.com/live/uCK_haOXPFM 

Why there’s no such thing as AI

Last October at All Things Open (ATO) I was interviewed by Jason Hibbits of We Love Open Source. It’s posted in the article “Why today’s AI isn’t intelligent (yet)“.

Technically We Write — Our Partner Site

Our partner site, Technically We Write, has published a number of articles from several contributors to Both.org. Check them out.

Technically We Write is a community of technical writers, technical editors, copyeditors, web content writers, and all other roles in technical communication.

Subscribe to Both.org

To comment on articles, you must have an account.

Send your desired user ID, first and last name, and an email address for login (this must be the same email address used to register) to subscribe@both.org with “Subscribe” as the subject line.

You’ll receive a confirmation of your subscription with your initial password as soon as we are able to process it.

Administration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

License and AI Statements

Both.org aims to publish everything under a Creative Commons Attribution ShareAlike license. Some items may be published under a different license. You are responsible to verify permissions before reusing content from this website.

The opinions expressed are those of the individual authors, not Both.org.

You may not use this content to train AI.

 

Advertising Statement

Both.org does not sell advertising on this website.


Advertising may keep most websites running—but at Both.org, we’re committed to keeping our corner of the web ad-free. Both.org does not sell advertising on the website. Nor do we offer sponsored articles at this time. We’ll update this page if our position on sponsorships changes.

We want to be open about how the website is funded. Both.org is supported entirely by David Both and a few other dedicated individuals.

 

 

Copyright © All rights reserved. | MoreNews by AF themes.