CS50P Introduction

CS50P 🔗

Class information

Week 0 Functions, Variables

Week 0 Course Material

Before doing First problem 

Join CS50P Course

Problem Set 0

Indoor Voice

Indoor Voice Problem & Hint

Step-by-step Guide for Indoor Voice Setup

Indoor Voice Excution Demo

Indoor Voice Test, Check and Submit

You need to do a test following these steps, like a demo.

Check

Submit

First Problem Solution

Going to CS50P VS Code workspce

First Problem Solution

First Problem Solution

Linux System Command

Python Code Editor

First Problem Solution

Introduction to Linux Commands

What is Linux?

  • Open-source Operating System
  • Known for its stability, security, and flexibility

Why Learn Linux?

  • Foundation for many servers and systems
  • Essential for CS50 problem sets

Navigating The File System

'pwd'    : Print Working Directory
'ls'     : List Files
'ls -la' : List All Files with Details
'cd'     : Change Directory
'cd ..'  : Move Up One Directory
'cd ~'   : Move to Home Directory

'pwd' - Print Working Directory

  • Displays the current directory
$ pwd
/home/user

'ls' - List Files

  • Lists all files and directories in the current directory
$ ls
Desktop  Documents  Downloads

'ls -la' - List All Files with Details

  • Lists all files and directories with detailed information
$ ls -la
total 12
drwxr-xr-x 3 user user 4096 Oct 11 09:37 .
drwxr-xr-x 7 user user 4096 Oct 11 09:35 ..
-rw-r--r-- 1 user user   39 Oct 11 09:37 file.txt

'cd' - Change Directory

  • Changes the current directory
$ cd Documents
Documents $ pwd
/home/user/Documents

'cd ..' - Move Up One Directory

  • Moves up one directory
Documents $ cd ..
$ pwd
/home/user

'cd ~' - Move to Home Directory

  • Moves to the home directory
Documents $ cd ~
$ pwd
/home/user

Manipulating Files and Directories

'mkdir' : Make Directory
'touch' : Create Empty File
'cat'   : Concatenate and Display File Content
'rm'    : Remove File
'rm -f' : Force Remove File
'rm -r' : Remove Directory Recursively
'rm -rf': Force Remove Directory Recursively

'mkdir' - Make Directory

  • Creates a new directory
$ mkdir new_directory
$ ls
Desktop  Documents  Downloads  new_directory

'touch' - Create Empty File

  • Creates a new empty file
$ touch new_file.txt
$ ls
Desktop  Documents  Downloads  new_directory  new_file.txt

'cat' - Concatenate and Display File Content

  • Displays the contents of a file
$ echo "Hello, World!" > file.txt
$ cat file.txt
Hello, World!

'rm' - Remove File

  • Removes a file
$ rm new_file.txt
$ ls
Desktop  Documents  Downloads  new_directory

'rm -f' - Force Remove File

  • Forcefully removes a file without prompting
$ rm -f file.txt
$ ls
Desktop  Documents  Downloads  new_directory

'rm -r' - Remove Directory Recursively

  • Removes a directory and its contents
$ rm -r new_directory
$ ls
Desktop  Documents  Downloads

'rm -rf' - Force Remove Directory Recursively

  • Forcefully removes a directory and its contents without prompting
$ mkdir new_directory
$ touch new_directory/new_file.txt
$ rm -rf new_directory
$ ls
Desktop  Documents  Downloads

Clearing The Terminal

'clear' - Clear Terminal Screen

  • Clears the terminal screen
$ clear

CS50P Introduction

By wschen

CS50P Introduction

This presentation introduces CS50P and covers topics such as functions, variables, problem sets, and Linux commands. Learn about the course material and get a step-by-step guide for setting up Indoor Voice. Discover why learning Linux is important and how to navigate the file system.

  • 515