List, partitioning and format drives

List all devices: $> sudo fdisk -l That will give you an overview about all your drives like that: Disk /dev/sda: 256.1 GB, 256060514304 bytes 255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): […]

Get a list of partitions

To get a list of your currently mounted partitions: $> sudo blkid -o list -w /dev/null Result device fs_type label mount point UUID —————————————————————————————————————————————————————————————- /dev/sda1 ext4 / 79012107-aeb7-4f72-95ca-a9ffaa9f502b /dev/sda5 swap <swap> 34e355d7-dd93-45f7-9696-02c6d4ebb8e8 /dev/sdb1 ntfs /media/7EEFE87C38D4D6CF 7EEFE87C38D4D6CF  

Get free disk space and partitions

Show free disk space for all existing partitions (disk free): $> df -haT Example output: Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/ubuntu–vg-root ext4 227G 177G 39G 83% / proc proc 0 0 0 – /proc sysfs sysfs 0 0 0 – /sys none tmpfs 4,0K 0 4,0K 0% /sys/fs/cgroup none fusectl 0 0 0 […]