Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Command Line Tools for Linux File System

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Please refer to Command Line Tools for Mac File System for the macOS version.

  1. List disk information.

     df
     df /HOME
  2. Format disk partitions.

     mkfs.ext4 /dev/sdb3
    
     mkfs.ntfs /dev/sdb3
    
     mkfs.exfat /dev/sdb3
  3. Management disk partition tables.

     fdisk /dev/sdb
  4. Report disk usage.

     du -lhd 1 .
  5. dd

     dd if=... of=... bs=1M; sync
  6. badblocks

  7. lsblk

References

How To – Linux List Disk Partitions Command

10 Commands to Check Disk Partitions and Disk Space on Linux