Intro to UNIX Presented by: Student Ambassadors: Lauren Lewis Martin Sung.

14
Intro to UNIX Presented by: Student Ambassadors: Lauren Lewis Martin Sung

Transcript of Intro to UNIX Presented by: Student Ambassadors: Lauren Lewis Martin Sung.

Intro to UNIX

Presented by:

Student Ambassadors:Lauren LewisMartin Sung

Introduction

Why Study Information Technology?

• Technology is advancing• Businesses need faster and more efficient ways to transmit data• IT gives people the ability to connect anywhere, at any time• Paper products, such as magazines and newspapers, are becoming

obsolete

Careers:• Web developer/designer• Game developer/designer• Systems analyst• Network administrator• Database administrator• Information security• Network security• Mobile application

development• Software developer• IT project manager

What is UNIX?

•UNIX is a family of multitasking, multiuser 

computer operating systems

•Dennis Ritchie and Ken Thompson of Bell Laboratories developed the UNIX operating system in the early 1970’s

Basic Computer System Components

Directories, Files, & Pathways

Files• A well defined repository of information• Special files called directories contain or point to other

files

Structure of Directories• Hierarchically structured like an inverted tree• / is the starting directory or “root”

Pathnames• Locating a file by following a sequence of directories

until you reach the file• / is also the separator between the directories and final

file

Example Directory

bin home work docs

juniormusic movies

Tay Swift calculus spanish Harry Potter

hw

/

Absolute pathnames start at the root

Example:/home/junior/calculus/hw

Relative pathnames start at the current directory

Example:If starting from file “junior"calculus/hw

Useful File Commandsls list files

cat view file contents

more view file contents (pause each screen)

touch creates file / updates time stamp

cp copy file to a new file

mv move file to a new directory, rename file

rm delete file

pwd display absolute pathname to current directory

mkdir create directory

rmdir remove directory

cd navigate directories

Scripting• In addition to typing commands directly to the

shell, you can place them in a file and then run the file

• A file containing UNIX shell commands is known as a script (or shell script)

• Typical operations performed by shell scripts include file manipulation, program execution, and printing text

Script Example

Basic Script Commands

•#!/bin/sh: tells the parent shell which interpreter should be used to execute the script

•echo: writes its arguments to standard output

•read: reads a single line from standard input

•$: denotes a variable

So Why is UNIX Still Important Today?

• Open source software

• It’s EVERYWHERE!

• The Internet

• The telephone

• The UNIX way

▫Write programs that:

Do one thing and do it well

Work together

Handle text streams because that is the universal interface

Smartphones

• Apple iOS

• Android

• Google

Learn UNIX!