Monday, February 27, 2023

Adding Disk in linux making ready formatting partitioning

 




  1. Connect the disk, or check if it is attached to the machine.

  2. 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.

  3. 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 or parted command to create a new partition on the disk.

  4. 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.

  5. 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 the mount command.

  6. 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 ......

Featured Posts

Enhancing Unix Proficiency: A Deeper Look at the 'Sleep' Command and Signals

Hashtags: #Unix #SleepCommand #Signals #UnixTutorial #ProcessManagement In the world of Unix commands, there are often tools that, at first ...