Beginner Labs
Lab 0 - Reflect

Intermediate Lab: 0

In this module, we'll go over some fundamental terminal commands and concepts you need to know before starting the quiz and lab exercises. By the end of this section, you'll be familiar with navigating the file system, creating and managing files and directories, and using basic network tools.

Terminal Basics

  1. ls - List Directory Contents

    The ls command is used to list the contents of a directory. It shows files, directories, and sometimes hidden files, depending on the options used.

    ls          # List files in the current directory
    ls /        # List files in the root directory
    ls -a       # List all files, including hidden ones
    ls -l       # List files in a detailed format
  2. cd - Change Directory

    The cd command allows you to navigate between directories.

    cd /home       # Change to the /home directory
    cd ..          # Move up one directory level
    cd /usr/local  # Move to the /usr/local directory
  3. pwd - Print Working Directory

    The pwd command displays the current directory you are in.

    pwd            # Shows the current directory path
  4. mkdir - Create Directory

    Use mkdir to create new directories.

    mkdir testDir  # Creates a directory named testDir
  5. touch - Create a New File

    The touch command creates an empty file or updates the timestamp of an existing file.

    touch newfile.txt  # Creates a new file named newfile.txt

File Management

  1. cp - Copy Files and Directories

    The cp command copies files or directories from one location to another.

    cp source.txt destination.txt      # Copy source.txt to destination.txt
    cp -r /source/dir /destination/    # Copy a directory recursively
  2. mv - Move or Rename Files and Directories

    The mv command moves files or directories or renames them.

    mv oldname.txt newname.txt   # Renames oldname.txt to newname.txt
    mv /old/path /new/path       # Moves the directory from old to new path
  3. rm - Remove Files and Directories

    Use rm to delete files or directories. Be careful as this action is irreversible.

    rm file.txt         # Deletes file.txt
    rm -r directory/    # Recursively deletes a directory and its contents

File Permissions

  1. chmod - Change File Permissions

    The chmod command changes the access permissions of files and directories.

    chmod 755 script.sh  # Sets read, write, execute for owner; read, execute for group and others
    chmod u+x script.sh  # Adds execute permission for the owner
  2. chown - Change File Ownership

    The chown command changes the owner and group of files or directories.

    chown user:group file.txt  # Changes the owner and group of file.txt

Networking Basics

  1. ping - Test Network Connectivity

    The ping command checks if a host is reachable over the network.

    ping google.com     # Pings google.com
  2. traceroute - Trace Network Path

    The traceroute command shows the path packets take to reach a host.

    traceroute example.com  # Shows the route to example.com
  3. tcpdump - Network Packet Analyzer

    tcpdump captures and analyzes network packets. This is useful for inspecting network traffic.

    tcpdump -i eth0    # Capture packets on interface eth0
  4. tshark - Terminal-Based Wireshark

    tshark is the terminal version of Wireshark, used for capturing and analyzing network traffic.

    tshark -i eth0    # Start capturing packets on interface eth0

Fingerprinting Basics

  1. JA3, JA4, and JARM Fingerprinting

    These are methods used to identify TLS client and server communications.

    • JA3: Creates a fingerprint of the SSL/TLS client.
    • JA4: Captures additional details in TLS handshakes.
    • JARM: A method to identify servers based on TLS configurations.
    ja3               # Capture and display JA3 fingerprint
    ja4               # Capture and display JA4 fingerprint
    jarm              # Capture and display JARM fingerprint

Getting Started

Now that you have a basic understanding of the terminal commands and network tools, you can proceed to the terminal lab. Make sure to use the help command in the terminal to see all available commands and options.

Note: If you're unsure about a command or its usage, you can always refer back to this guide or use the help command in the terminal.


By mastering these basics, you'll be well-prepared for the terminal lab and quiz. Good luck!