Skip to content

universal-verification-methodology/learn_unix_git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Learn Unix & Git: Shell and Version Control for Digital Design

License: CC BY 4.0

Unix, Git, and tooling basics for students taking digital design and verification courses. This project provides a complete educational path from shell fundamentals through Git collaboration and end-to-end project workflow. Each module has CHECKLIST.md (exercise checklist), EXAMPLES.md (index of hands-on examples with "Try these"), and README.md (quick start). Each module doc in docs/ includes topics, exercises, assessment, and a Command Reference (Detailed) with descriptions of every command: what it does, how it works, common options, and usage examples.

πŸ“‹ Table of Contents

🎯 Overview

This project is a complete educational resource for learning Unix and Git in the context of digital design and verification. It provides:

  • 8 Progressive Modules: From Linux & shell basics to end-to-end project workflow
  • Comprehensive Examples: Working examples in each module directory
  • Command Reference (Detailed): Per-command descriptions, syntax, options, and tips in every module doc
  • Automated Scripts: Self-check, demo, and scaffold scripts for each module
  • Full Documentation: Topics, exercises, assessment, and learning outcomes
  • Course Alignment: Structure and workflows that match typical digital design courses

Why Unix & Git?

  • Industry Standard: Shell and version control are essential for hardware and software teams
  • Digital Design Workflow: Navigate RTL projects, run simulators, capture logs, and manage source with Git
  • Reproducibility: Scripted builds, clear history, and clean submission habits
  • Collaboration: Clone repos, work on branches, merge, and submit via GitHub
  • Foundation: Prepares you for Verilog/SystemVerilog courses and tooling (e.g. iverilog, Verilator)

Learning Approach

  • Theory: Concepts (processes, redirection, staging area, branches, etc.)
  • Practice: Hands-on commands and scripts with real examples
  • Reference: Detailed command reference in each module for lookup and review
  • Progressive: Builds from basic navigation to full project-and-Git workflow

✨ Features

  • βœ… 8 Modules: Complete path from shell basics to end-to-end workflow
  • βœ… Per-module layout: CHECKLIST.md (exercises), EXAMPLES.md (example index with "Try these"), README.md (quick start)
  • βœ… Command Reference (Detailed): Every command documented in each module doc (what/how/syntax/options/examples/tips)
  • βœ… Practical Examples: Navigation, files, permissions, pipes, scripts, archives, Git, submodules
  • βœ… Scripts per Module: --check, --demo, --scaffold (where applicable)
  • βœ… Exercises & Assessment: Hands-on tasks and CHECKLIST.md for each module
  • βœ… GitHub-Oriented: Clone, commit, push, pull, branches, merge, PRs
  • βœ… Digital Design Context: Project layout (src/, tb/, build/), logs, and submission flow
  • βœ… Safe Practices: Quoting, .gitignore, restore, clean rebuild, pre-submission checks

πŸ“š Prerequisites

Required Knowledge

  • Basic Computer Use: Ability to open a terminal and type commands
  • No Prior Unix Required: Course starts from navigation and files
  • No Prior Git Required: Git basics are introduced in Module 6

System Requirements

  • Operating System: Linux, macOS, or Windows (WSL2 recommended)
  • Shell: Bash or compatible (zsh fine)
  • Git: Git installed (git --version works) for Modules 6–8
  • Optional: GitHub account for remote examples and submission practice

πŸš€ Quick Start

1. Clone the Repository

git clone <repository-url>
cd learn_unix_git

2. Make Scripts Executable

chmod +x scripts/*.sh

3. Run Module 1 Self-Check and Demo

./scripts/module1.sh --check   # self-check
./scripts/module1.sh --demo    # print demo commands
./scripts/module1.sh --scaffold # create ~/unix_practice for exercises

4. Start Learning

Begin with Module 1: Linux & Shell Basics and follow the modules sequentially. Each module doc has a Command Reference (Detailed) section for command lookup.

πŸ“ Project Structure

learn_unix_git/
β”œβ”€β”€ docs/                      # Module documentation (syllabus)
β”‚   β”œβ”€β”€ MODULE1.md             # Linux & Shell Basics
β”‚   β”œβ”€β”€ MODULE2.md             # Filesystem, Permissions & Environment
β”‚   β”œβ”€β”€ MODULE3.md             # Processes, Pipes & Redirection
β”‚   β”œβ”€β”€ MODULE4.md             # Shell Productivity & Basic Scripting
β”‚   β”œβ”€β”€ MODULE5.md             # Editors, Projects & Archives
β”‚   β”œβ”€β”€ MODULE6.md             # Git Basics for Course Work
β”‚   β”œβ”€β”€ MODULE7.md             # Advanced Git for Collaboration & IP Reuse
β”‚   └── MODULE8.md             # End-to-End Project Workflow
β”‚
β”œβ”€β”€ module1/                   # Shell basics (navigation, files, viewing, help)
β”‚   β”œβ”€β”€ CHECKLIST.md           # Exercise checklist (check off as you go)
β”‚   β”œβ”€β”€ EXAMPLES.md            # Index of examples with "Try these"
β”‚   β”œβ”€β”€ README.md              # Quick start and directory layout
β”‚   β”œβ”€β”€ examples/              # navigation, paths, file_operations, viewing, etc.
β”‚   └── ...
β”œβ”€β”€ module2/ … module8/        # Same layout: CHECKLIST.md, EXAMPLES.md, README.md, examples/
β”‚
β”œβ”€β”€ scripts/                   # Per-module scripts + Git helpers
β”‚   β”œβ”€β”€ module1.sh … module8.sh   # --check, --demo, --scaffold
β”‚   β”œβ”€β”€ git-submodule-init.sh     # init/update submodules (after clone)
β”‚   β”œβ”€β”€ git-submodule-add.sh      # add submodule (url [path])
β”‚   β”œβ”€β”€ git-submodule-status.sh   # status of all submodules
β”‚   β”œβ”€β”€ git-clone-with-submodules.sh  # clone + submodule update --init --recursive
β”‚   └── README.md                  # script usage
β”‚
└── README.md                  # This file

πŸ“– Documentation

The docs/ directory contains the syllabus and module guides. Each module doc includes:

  • Topics Covered: What the module teaches
  • Command Reference (Detailed): Per-command descriptions, syntax, options, examples, tips
  • Learning Outcomes: What you should be able to do after the module
  • Exercises: Hands-on tasks
  • Assessment: Checklist for self or instructor

Module Documentation

  • MODULE1.md: Linux & Shell Basics

    • Navigation (pwd, ls, cd), paths, file operations (mkdir, cp, mv, rm), viewing (cat, less, head, tail), help (man, --help)
  • MODULE2.md: Filesystem, Permissions & Environment

    • File types, ls -l, symbolic links (ln -s), permissions (chmod), ownership (chown), environment (PATH, echo, env, which, export), dotfiles
  • MODULE3.md: Processes, Pipes & Redirection

    • Processes (ps, kill), jobs (&, jobs, fg, bg), redirection (>, >>, 2>, 2>&1), pipes (|), grep, tee
  • MODULE4.md: Shell Productivity & Basic Scripting

    • History (history, shortcuts), aliases (alias, unalias), script basics (shebang, chmod +x), variables and arguments ($1, $@), control flow (if, for), safe scripting (set -e, quoting)
  • MODULE5.md: Editors, Projects & Archives

    • Editors (nano, vim, code), project structure (src/, tb/, docs/, scripts/, build/), find, grep -R, tree, tar, zip, unzip, backup (date, timestamped archives)
  • MODULE6.md: Git Basics for Course Work

    • Repository, working tree, staging area, commit; git init, clone, status, add, commit, log, diff; .gitignore; remotes (git remote, pull, push); safe undo (git restore)
  • MODULE7.md: Advanced Git for Collaboration & IP Reuse

    • Branches (git branch, checkout, switch), merge (fast-forward, merge commit), conflict resolution, submodules (add, update --init), git blame, git bisect, PR workflow, git fetch
  • MODULE8.md: End-to-End Project Workflow

    • Clone template, run scripts from root, redirect logs, inspect with tail/less/grep, iterative editβ†’runβ†’commit loop, branching, pre-submission checks (git status, git clean -fdx in a copy), push and verify on GitHub

πŸŽ“ Modules

Module 1: Linux & Shell Basics

Get comfortable with the terminal and basic file operations: pwd, ls, cd, mkdir, cp, mv, rm, cat, less, head, tail, man, --help.

Quick Start: ./scripts/module1.sh --check | --demo | --scaffold

Module 2: Filesystem, Permissions & Environment

Understand file types, permissions (chmod), ownership, PATH, environment variables, and dotfiles.

Quick Start: ./scripts/module2.sh --check | --demo | --scaffold

Module 3: Processes, Pipes & Redirection

Manage processes (ps, kill), run jobs in background, redirect stdout/stderr, use pipes and grep.

Quick Start: ./scripts/module3.sh --check | --demo | --scaffold

Module 4: Shell Productivity & Basic Scripting

Use history and aliases; write shell scripts with variables, arguments, conditionals, and loops; apply safe scripting practices.

Quick Start: ./scripts/module4.sh --check | --demo | --scaffold

Module 5: Editors, Projects & Archives

Use editors from the terminal; organize projects (src/, tb/, docs/, scripts/, build/); find files and text; create and extract tar and zip archives.

Quick Start: ./scripts/module5.sh --check | --demo | --scaffold

Module 6: Git Basics for Course Work

Initialize and clone repos; track changes (status, add, commit, log, diff); use .gitignore; connect to GitHub (remote, pull, push); safely undo changes (restore).

Quick Start: ./scripts/module6.sh --check | --demo | --scaffold

Module 7: Advanced Git for Collaboration & IP Reuse

Create and switch branches; merge (including conflict resolution); use submodules; inspect history (blame, bisect); follow branch-and-PR workflow.

Quick Start: ./scripts/module7.sh --check | --demo

Module 8: End-to-End Project Workflow

Combine Unix and Git: clone a template, run scripts, capture and inspect logs, develop iteratively with small commits, prepare and submit via GitHub.

Quick Start: ./scripts/module8.sh --check | --demo

πŸ’» Usage

Per-Module Scripts

Each module has a script under scripts/:

./scripts/moduleN.sh --check    # self-check (prerequisites, tools)
./scripts/moduleN.sh --demo     # print demo commands
./scripts/moduleN.sh --scaffold # create practice dirs/files (modules 1–6)

Run from the repository root. Not all modules have --scaffold; see the module doc or script help.

Git scripts (submodules)

Helper scripts for Git submodules (see scripts/README.md):

./scripts/git-submodule-init.sh              # init/update submodules after clone
./scripts/git-submodule-init.sh --check      # list submodules only
./scripts/git-submodule-add.sh <url> [path]  # add a submodule
./scripts/git-submodule-status.sh           # status of all submodules
./scripts/git-clone-with-submodules.sh <url> [dir]  # clone + init submodules

Module Content and Examples

Command Reference

For any command introduced in a module, open that module’s doc and go to the Command Reference (Detailed) section. There you’ll find what it does, how it works, syntax, options, examples, and tips.

🀝 Contributing

Contributions are welcome. This project follows practices suited to educational material:

  1. Documentation: Keep module docs and command references clear and consistent.
  2. Examples: Ensure examples run and match the described workflow.
  3. Scripts: Preserve --check, --demo, --scaffold behavior; document new options.
  4. Structure: Follow the existing module layout (docs/, moduleN/, scripts/).

πŸ“„ License

This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). See LICENSE in this repository for the license text and a link to the full legal code.

CC BY 4.0

What this means

  • βœ… You may: Share and adapt the material for any purpose, including commercially.
  • πŸ“ You must: Give appropriate credit, link to the license, and indicate if changes were made.

πŸ“ž Support

For questions or issues:

  1. Check the documentation and the Command Reference (Detailed) in each module doc.
  2. Review each module’s README.md, EXAMPLES.md, and CHECKLIST.md for quick start, example index, and exercises.
  3. Run ./scripts/moduleN.sh --check and --demo for the relevant module.
  4. Open an issue for bugs or suggestions.

Happy Learning! πŸš€

Start with Module 1: Linux & Shell Basics.

About

Unix, Git, and tooling basics for students taking digital design and verification courses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages