Intro to Programming Languages

LecLabs 1.0 Intro and Linux

[ ← Module List ]

This module introduces the basics of Linux, including its history, architecture, and common commands. It is designed for beginners who are new to Linux and want to understand its fundamental concepts.

14 challenges

Challenges

CHALLENGE 01

Lecture 1.1. Course Environment

— solves

Lecture video on Course Environment

CHALLENGE 02

Lab 1.1 - Start Terminal

— solves

CTRL-Click Here for Follow Along Video

To complete the lab, do the following steps

  • Start the challenge
  • Control-click on Workspace
  • Switch tabs to VSCode Workspace
  • Open the folder to /home/hacker/cse240 following the commands in VSCode
  • Right click on the left side and select "open integrated terminal" or use `ctrl-~` to open a terminal. The flag should be shown in the terminal.
  • Type in `cat /flag`
  • Copy and paste flag to pwn.college website
CHALLENGE 03

Lecture 1.2. Linux Shells

— solves

Lecture video on Linux Shells

CHALLENGE 04

Lecture 1.3. Linux File System

— solves

Lecture video on Linux File System

CHALLENGE 05

Lecture 1.4. Executing Programs

— solves

Lecture video on Executing Programs

CHALLENGE 06

Lecture 1.5. Common Commands

— solves

Lecture video on Common Commands

CHALLENGE 07

Lab 1.5.2 - Using ls and cd

— solves

For this level we will find the flag in the /challenge folder using `cd` and `ls` commands. Look in the dir1, dir2, and dir3. From there, look at their subdirectories until you find the `flag` file.

CTRL-Click Here for Follow Along Video

CHALLENGE 08

Lab 1.5.3 - Using grep

— solves

For this level, we will find the flag in one of the `.txt` files located in the /challenge directory.

To find the flag in the files, you will need to use the `grep` program and look for `pwn.college` (i.e., the flag value).

CTRL-Click Here for Follow Along Video

CHALLENGE 09

Lecture 1.6. Redirection of I/O

— solves

Lecture video on Redirection of I/O

CHALLENGE 10

Lab 1.6 - Using grep and pipe

— solves

The getflag program in the /challenge directory will give you the flag when you send the lines from `/challenge/text` that contain a `q` or an `x` only.

The getflag program is reading from standard input so you can use the proper `grep` command followed by | and then the path to the `getflag` program.

Remeber to execute the file you must use the relative or absolute path because getflag's directory is not in the PATH environmental variable.

CTRL-Click Here for Follow Along Video

CHALLENGE 11

Lecture 1.7. Regular Expressions

— solves

Lecture video on Regular Expressions

CHALLENGE 12

Lecture 1.8. Misc Linux

— solves

Lecture video on Misc Linux

CHALLENGE 13

Lecture 1.9. Testing Code on pwn.college

— solves

Lecture video on Testing Code on pwn.college

CHALLENGE 14

Lab 1.9 - Test some If Statements

— solves

In this level, you will write 4 user test cases for the provided C program.

CTRL-Click Here for Follow Along Video

The C program, located at ~/cse240/labw/lab10/05/main.c.
  • For each of the user tests, the test must pass the program when modelGood is used and fail the program when modelBad is used
  • The user tests are located in ~/cse240/labw/lab10/05/user_tests/
    • utest19.0.1 will test the first if statement
    • utest19.0.2 will test the second if statement
    • utest19.0.3 will test the third if statement
    • utest19.0.4 will test the fourth if statement
  • When all the test cases pass the modelGood and fail the modelBad the tester will reveal the flag.
HELPFUL HINT: if you have navigated away from your project folder, you can quickly get back by using the alias `cdhw`