Skip to content

Instantly share code, notes, and snippets.

@ncimino
Last active August 29, 2015 14:05
Show Gist options
  • Save ncimino/346b1d869c14b6b005f7 to your computer and use it in GitHub Desktop.
Save ncimino/346b1d869c14b6b005f7 to your computer and use it in GitHub Desktop.
Linux Disks
fdisk -l | grep '^Disk'; # list drives
file -s /dev/sdd; # list device sdd details
fsck /dev/sdd; # check device sdd
fdisk /dev/sdd; # partition drive
# m - print help
# p - print the partition table
# n - create a new partition
# d - delete a partition
# q - quit without saving changes
# w - write the new partition table and exit
mkfs.ext3 /dev/sdd; # format as ext3 (change for other types)
mkdir /mnt/ext1; # make dir to mount drive within
mount -t ext3 /dev/sdd /mnt/ext1
umount /mnt/ext1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment