0% found this document useful (0 votes)
14 views5 pages

Os 3

Uploaded by

Abrar Zawad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views5 pages

Os 3

Uploaded by

Abrar Zawad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

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.

• Unmount the partition with the umount command


5. Checking Disk Usage:
• Use df -h to check the available and used disk space for all mounted filesystems.

• Use du -sh * to display disk usage of each directory.

• Use du -sh /path/to/directory to check the disk usage of a specific directory.

You might also like