Disk Operations in Linux

Some of the commands in this article may cause unwanted behavior. Please use them at your own risk.

Here are some basic disk operation commands that are needed regularly.

List all drives

lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

Output

NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 931.5G 
├─sda1 ntfs 100M System Reserved
├─sda2 ext4 310.4G / 
├─sda3 ntfs 310.5G 3D-Projects
└─sda4 ntfs 310.5G WINDOWS
sdb 931.5G 
├─sdb1 1K 
├─sdb5 ntfs 465.8G /home/Files Files
└─sdb6 ntfs 465.8G /home/Backup Backup

Mount Drive

mount -t ntfs /dev/sda3 /mnt

UnMount Drive

umount /mnt

Level: Intermediate

Technologies: Linux / Unix, Git

post via Codincafe