Unix Filesystem Basics
Overview
Building on the introductory tour of Linux, this week deepens your understanding of the command-line interface and the structure of the Unix filesystem.
You will learn how to use shell commands effectively, explore standard directories and their purposes, understand file types (regular files, directories, devices, links), and manage users, groups, and permissions.
By the end of this week you should be able to confidently navigate the filesystem, interpret file metadata, and control access rights using the shell.
Key Concepts
- The shell as an interface: command syntax, arguments, options
- Command synopsis and using
manpages - Standard Linux directory hierarchy (
/bin,/etc,/home,/var,/proc,/dev, …) - File types: regular, directory, character/block devices, sockets, FIFOs
- Hard links vs. symbolic (soft) links
- Users, groups, and ownership model
- File permissions: read/write/execute,
chmod,chown,chgrp
Practice / Lab
- Shell Exploration:
- Use
man,which,typeto discover command info - Practice navigation with
cd,pwd,ls -l,tree
- Use
- Filesystem Walk:
- Inspect the top-level folders under
/ - Explore
/procand/devfor virtual and device files
- Inspect the top-level folders under
- Working with Links:
- Create hard and symbolic links (
ln,ln -s) and examine inode numbers withls -i
- Create hard and symbolic links (
- Permissions Management:
- Check file metadata with
ls -l - Change mode and ownership (
chmod,chown,chgrp) - Experiment with
umaskand default file permissions
- Check file metadata with
- Users & Groups:
- Inspect
/etc/passwdand/etc/group - Use
id,who,groupsto view account information
- Inspect
References & Resources
Required
- Filesystem Hierarchy Standard (FHS)
- Linux File Types (The Linux Documentation Project)
- GNU Coreutils Manual
- The Unix File System
- ECE 252 Lecture 3: The File System
- The Unix File System (GeeksForGeeks)
- Linux File System Explained
- Linux File Permissions Explained
- File Permissions
- Linux для Начинающих - Права Доступа и владения файлами и директориями (RUS)
Optional / Enrichment
- Linux Journey: The Shell
- Linux Journey: Filesystem
- Permissions Explained (DigitalOcean)
- Linux Commands Part Two: Working With Files
- 60 Linux Commands to Know
- Basic Linux Commands
Tools
ls,cd,pwd,man,file,stat,treeln,chmod,chown,groups,id
Quiz (Self-check)
- What is the difference between a hard link and a symbolic link?
- Which directory holds configuration files for most system services?
- What do the three sets of characters in
rwxr-xr--represent? - How can you find the manual page for a command?
- Which virtual directory contains information about running processes?