Last active
July 21, 2016 08:54
-
-
Save morgangiraud/23780b5c5322dcb4e42831b0d29a6907 to your computer and use it in GitHub Desktop.
Handling disk and filesystem on ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all block device with diverse information | |
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL | |
# Managing partition | |
sudo fdisk /dev/sdx # MBR mode, the old way. Can't handle more than 2T | |
sudo gdisk /dev/sdx # the new way | |
# Format the drive with the filesystem type you want | |
# This is when a UUID is created | |
sudo mkfs -t ext4 /dev/sdx | |
# Grab UUID of all drives | |
sudo blkid | |
# Edit fstab to make your system aware of those drives | |
# fstab is the file used by linux to mount drives at startup | |
sudo vim /etc/fstab | |
# Mount all drives defined in /etc/fstab | |
sudo mount -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment