Disk Management
Disk device list
lsblk
Show disk detail:
lsblk -o NAME,UUID,SIZE,TYPE,MOUNTPOINT
Detect the disk
sudo fdisk -l /dev/<device-name>
Create a filesystem / format partition
sudo mkfs.ext4 /dev/<device-name>
Resize Filesystem (if already partitioned)
sudo resize2fs /dev/sdb1
Display storage size
df -h
Mount disk
mount /dev/<device-name> /mnt/<path>
Unmount disk
umount /mnt/<path>
Persist the mount on reboot
nano /etc/fstab
/dev/<device-name> /mnt/<path> ext4 defaults 0 2
No Comments