Os 3
Os 3
Disk Information
• Use the lsblk or fdisk -l command to display information about all available disks and partitions
on the system.
• Identify the following:
➢ Total disk size
➢ Partition types (e.g., primary, extended)
➢ Filesystem types (e.g., ext4, xfs)
• Use blkid to display UUIDs of the partition
2.Disk Partition: • Use fdisk or parted to create a new partition on an unallocated disk.
➢ Choose the disk /dev/sdb (or another available disk) for the new partition.
➢ Create at least two partitions: one for Linux filesystems and another as swap
space. • Verify the new partition layout using lsblk and fdisk -l.
3.Creating Filesystems: • Format one of the new partitions created above (e.g., /dev/sdb1) with
the ext4 filesystem using the mkfs.ext4 command.
• Format another partition with the xfs filesystem using mkfs.xfs.
• Verify the filesystems with lsblk -f and blkid
4.Mounting and Unmounting Partitions:
• Mount the ext4 partition to a directory, e.g., /mnt/data, using the mount command.
• Create a simple file inside the mounted partition to verify the mount.