Exercise 1: Exploring the File System Hierarchy
- Use the
ls
command to list the contents of the root directory (/
). Identify the directories mentioned in the tutorial. - Dive deeper into these directories, use
cd
to navigate andls
to list contents. Try to match the contents with the purpose of the directory described in the tutorial.
Exercise 2: Understanding the Purpose of Different Directories
- Write a short paragraph describing the purpose of each of the following directories:
/etc
,/home
,/var
, and/usr
. - Find a file in each directory that serves the purpose you described.
Exercise 3: Working with Mounted Devices
- Use the
mount
command to see all currently mounted devices. Identify at least five devices and the directories they’re mounted on. - Run the
df -Th
command to view disk usage statistics for the mounted filesystems. Identify the filesystem with the most available space and the filesystem with the least available space. - Use the
findmnt
command to display a tree-oriented list of all mounted devices. Identify any relationships between mounts.
Exercise 4: Creating and Mounting a New Filesystem
- Use the
dd
command to create a new 1GB file. Use this file to create a new ext4 filesystem using themkfs
command. - Create a new directory under
/mnt
and mount the new filesystem there. - Verify the mount using the
df -hT
command and identify your new filesystem and mount point. - Test the new filesystem by creating files and directories within the mounted directory.
- Unmount the filesystem using the
umount
command and verify it’s no longer mounted.
Exercise 5: Analyzing the /boot directory
- Navigate to the
/boot
directory and list its contents. - Identify the kernel and initramfs files.
- Explain the purpose of these files and why they need to be in a separate
/boot
partition.
Please note, the fourth exercise should be performed by users who are comfortable with the command line and have a good understanding of filesystems. As always, be careful when executing commands as root or with sudo, especially when they relate to filesystems or disks.