1 of 18

Intro to Linux

and OSS

Lecture 1

Darlnim Park, Jaysa Garcia

2 of 18

Topics today

  • Course logistics
  • Intro to the shell
  • What is UNIX?
  • Free and Open Source Software

3 of 18

Logistics

  • Lab 1 is released, due Saturday, 02/03 11:59pm PST
  • Vitamin 1 will be released Tuesday, due Sat 02/03 11:59pm PST
  • Enrollment codes have been sent out.
  • You should have access to Ed and Gradescope
    • Let us know if you do not!
  • Post Questions on Ed or send email to decal@ocf.berkeley.edu
  • Lecture slides, recording, and lab will all be posted at decal.ocf.io

4 of 18

Engaging with this lecture

  • Connect to the shell (follow along!)
    • ssh $OCF_USERNAME@ssh.ocf.berkeley.edu
  • Ask questions!
    • During live sessions
    • On #decal-general Discord
    • On EdStem

5 of 18

Shell

  • What is the shell? A command line-interface (CLI) to interact with the computer.�
  • Common shells: bash, zsh, fish
    • They’re mostly the same, (bash will be supported by almost all UNIX systems though).

6 of 18

Shell Commands

  • Basic structure of a command is `[command] [flags] [arguments]`
  • RTFM! `man (command)`
  • Google is also your best friend.

7 of 18

Common Shell Commands

  • `cd` - change directory
  • `ls` - list directory
  • `cat` - concatenate and print files
  • `head` - read the first 10 lines
  • `less` - read larger files
  • `mv` - move
  • `cp` - copy
  • `rm` - delete a file

8 of 18

Editors

  • Nano
  • Vim (`vimtutor`)
  • Emacs (Emacs Tutorial)
  • Try running `(editor of choice) (file)
  • Try searching “vi” or “emacs” on google

9 of 18

DEMO

10 of 18

Open Source Software (OSS)

Free and Open Source Software (FOSS) or Free/Libre Open Source Software (F/LOSS)

“Free as in beer, and free as in freedom”

Open source software - term used by some software and technology companies. You may not have the right to use, modify, or redistribute the software or source code.

11 of 18

GNU and the Free Software Movement

“So that I can continue to use computers without violating my principles, I have decided to put together a sufficient body of free software so that I will be able to get along without any software that is not free.”

Richard Stallman (1983)

https://groups.google.com/forum/#!msg/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J

12 of 18

GNU and the Free Software Movement

“So that I can continue to use computers without violating my principles, I have decided to put together a sufficient body of free software so that I will be able to get along without any software that is not free.”

Richard Stallman (1983)

https://groups.google.com/forum/#!msg/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J

13 of 18

The Four Freedoms

  1. The freedom to run the program as you wish, for any purpose.
  2. The freedom to study how the program works, and change it so it does your computing as you wish. Access to the source code is a precondition for this.
  3. The freedom to redistribute copies so you can help others.
  4. The freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.

What is free software? by the Free Software Foundation

14 of 18

Berkeley Standard Distribution

  • UNIX derivative (BSD) was created UC Berkeley in 1978
  • Popular and reliable, a lot of things from BSD are used today
    • vi and Berkeley sockets
  • Stuck in legal limbo w/ AT&T
  • BSD derivatives still remain popular (MacOS, FreeBSD, OpenBSD)

15 of 18

Unix’s advantages over non-Unix systems

  • UNIX philosophy: simple, short, clear, and modular code
  • UNIX idea: “everything is a file”
  • Worse is better.
  • Sockets for networking, now copied beyond Unix systems
  • “It’s very simple — you read the protocol and write the code.” - Bill Joy on implementing TCP/IP

16 of 18

Why FOSS?

  • Security
  • Cost
  • Privacy
  • Control
  • Collaboration

17 of 18

OSS Licenses: Legal Jiggery-Pokery

  • Copyleft (GPL)
    • “I want to make sure that all versions of GNU remain free.” - Stallman (GNU Manifesto)
    • “a cancer that attaches itself in an intellectual property sense to everything it touches” - Steve Ballmer
  • Permissive (MIT, BSD, Apache, WTFPL)
    • Do whatever you want (basically)
  • choosealicense.com/licenses

18 of 18

Additional Resources

Resources on learning:

Technical resources:

Fun reads about UNIX history and culture:

GOOGLE.COM