File Systems and Partitions using FDISK
fdisk (for “fixed disk”) is a commonly used name for a command-line utility that provides disk partitioning functions in an operations.
To check the connected storage on the linux partition ,type below command.
$fdisk -l
(it displays connected storage table details)
To create partition ,you need to run below commands
$fdisk /dev/sda2
arugments
n’ – to add a new partition
‘p’ – primary
‘1′ – start cylinder
‘+5096M’ – to indicate 5 Gigabytes
‘w’ – to write the changes to the disk
Note:Fdisk create only raw partition
to format raw partition.
$mke2fs -j /dev/sda2
after this check weather it is mounted are not using below command.
$cat /etc/fstab
or
$du -h
if /dev/sda2 is not mounted to then you need to mount using below command
$sudo mount /dev/sda2 /mnt/disk
(here i have mounted that into my desired location you can change as per your requirement)
now add mount location to /etc/fstab by doingbelow command
$vi /etc/fstab
add below line
/dev/sda2 /mnt/disk defaults,locale=en_IN 0 0
by doing it will automatically mount this partition on every boot.











Leave your response!