File Partition – Mount – Fdisk

In this post, I am writing how I do file partition and mounting in Linux.

Step-1:
check disk free by typing:
df -h

you will see disk and hardisk been used.

if you want to add new disk
fdisk -l

now you will see, in any disk attached in your system

fdisk /dev/your-new-disk

enter m for help
enter n for ‘to create new partition’

choose e for extended partition OR p for Primary Partition

enter partition number between (1-4): if it is first time then 1 else do accordingly.

mkfs.ext4 /dev/your-new-disk

vi /etc/fstab

mount -a