0% found this document useful (0 votes)
11 views15 pages

Tut 01

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

Tut 01

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Basic reviews: Linux, git, gcc, and C

programming
CSCI3150 Introduction to Operating Systems, Fall
2024

Shaofeng Wu
[email protected]
Sep 5, 2024
Course & Contact Information (1/2)

 TAs
 WU, Shaofeng (sfwu22)
Course website
 Yang, Yitao (ytyang) (branch: 2024-Fall)
 Li, Jianqiang (jqli1)
 Chen, Kaiwen (kwchen24)
 Chen, Yuetao (ytchen24)
 Feng, Yicheng (ycfeng)

 Tutorial sessions (all on Thursday)


 L01, Thu 10:30am - 11:15am, SHB 123
 L02, Thu 11:30am - 12:15pm, SHB 123
 L03, Thu 2:30pm - 3:15pm, SHB 924
 L04, Thu 4:30pm - 5:15pm, SHB 123
2

Course & Contact Information (2/2)

 Additional tips
 Question asking Course website
 Methods (branch: 2024-Fall)
 Email, Piazza
 Scope
 Asking TAs to code/debug for you
 Coding/thinking before asking
 Assignments
 Submission: Github classroom
 Grace token
 Generative AI policies

3
Release of Assignment One (1/1)

 Assignment One: Implementation of A Simple Shell


 Implement a basic shell that supports TODO: link and
 Built-in commands snapshot of the
asg
 External commands
 Pipe
 Aim
 Understanding how to interact with an operating system, e.g. Linux
 Understanding the design choices and rationales of a shell

 Deadline
 Oct. 7, 2024, 6:00 p.m. (~1 month)

4
Outline (1/1)

 In this week
 Linux basics
 Git basics
 Review on C programming

5
Linux basics (1/4)

 Concepts: what & why


 What is Linux?
 A family of Unix-like operating systems
 A lot of “distributions”(“versions”, “flavors”)
 Ubuntu, Fedora, …
 Why Linux?
 Open-source
 Community support

6
Linux basics (2/4)

 Accessing Linux
 Local
 WSL
 Docker containers (frequently used)
 VMs, e.g. using Virtualbox (frequently used)
 Dual-system, etc. …
 Remote
 CSE servers (frequently used)

7
Linux basics (3/4)

 Locally accessing Linux: Docker container (quick demo, only tested on


Windows)
 Install Docker desktop
 Search for and install ubuntu image
 In powershell, use the following command to start your docker container using host network
 docker run -it --name ubuntu --net=host ubuntu:latest
 Install dependencies and clone your repo to start working
 For more tips on docker, please refer to docker official website

Install ubuntu
image Start docker 8
Linux basics (4/4)

 Remotely accessing Linux: CSE servers (quick demo)


 Find a ssh client: putty, xshell, …
 Input command “ssh [email protected]” and enter your
password
 Wait for prompt, then input “ssh linux[code]”, “[code]” could be 1~16
 You can use “uname –a”, “lsb_release -a” and “gcc --version” to check for kernel
version, ubuntu version and gcc version of the server.

ssh to ssh to linux connected 9


Git basics (1/1)

 Concepts
 What is Git & Github?
 A version control tool
 An online source code hosting service that uses git
 Why using Git/Github?
 Automated CI/CD
 General workflow (quick demo with C programming examples)
 Go to Github and create a repo
 Git clone the repo on your local machine
 Coding
 Git add
 Git commit
 Git push
 Next time you start coding, git pull to get latest updates from collaborators and
merge their commits 1
C Programming Examples(1/1)

 Review of C programming
 Content Github classroom for C programming
 Example1: Structures examples:
https://classroom.github.com/a/
 Example2: Memory allocation hd7U6QDb
 Example3: File I/O
 Homework submission/(auto)grading/feedback rehearsal

1
Summary & Preview

 In this week
 Intro to CSCI3150 tutorial sessions
 Linux basics
 Git basics
 Review on C programming

 Next week
 Background knowledge of asg1
 Shell behaviour
 Code walk of asg1

1
Q&A
Additional Information

 Locally access Linux: VirtualBox as an example


 Download VirtualBox: https://www.virtualbox.org/wiki/Downloads
 Download a ubuntu 18.04 image: Ubuntu 18.04.6 LTS (Bionic Beaver)
 Check this guide for setting up your Linux VM:
https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-
machine-using-virtualbox
 Note: adjust the amount of resources you allocate to the VM according
to the capacity of your PC to avoid host starvation

1
Additional Information

 Problems you may encounter with VirtualBox and


Ubuntu
 Cannot copy from host and paste in VM, VM window is too small, …
 Require add-on support to be manually installed(a lot of tutorials
online)
 Cannot open terminal by clicking or keyboard shortcut(ctrl+alt+t)
 Use another terminal tool(i.e. xterm) and input “gnome-terminal”
 Check and search the error message online(stackoverflow, google,
…)
 Account not in sudoers file
 Input “su -” to switch to root
 Other questions can be searched with google(most questions relating
linux set up can actually be found on the Internet) or asked on piazza 1

You might also like