Connect the disk, or check if it is attached to the machine.
Identify the disk: Use the
lsblk
command to identify the disk. This command lists all the available block devices on your system, including disks and partitions. The output will show you the disk name and partition information.Create a partition: If the disk is new and has not been partitioned, you will need to create a partition. You can use the
fdisk
orparted
command to create a new partition on the disk.Format the partition: Once you have created a partition, you need to format it with a file system. The most common file system for Linux is ext4. You can use the
mkfs
command to format the partition.Mount the partition: After formatting the partition, you need to mount it to a directory in the file system. You can create a new directory using the
mkdir
command and then mount the partition to that directory using themount
command.Automount the partition (optional): If you want the partition to be automatically mounted every time your computer starts up, you can add an entry to the
/etc/fstab
file. This file contains information about file systems that should be mounted at boot time.
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......