november 5, 2015cis 118 intro to unix what’s a unix? unix is an operating system designed for...
TRANSCRIPT
![Page 1: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/1.jpg)
April 20, 2023 CIS 118 Intro to UNIX
What’s a Unix?
• Unix is an Operating System
• Designed for high-traffic usage
• Many variants– Linux, BSD: free versions
• Spelled either Unix or UNIX
![Page 2: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/2.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 3: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/3.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 4: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/4.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Multi-Computer, Multi-User
Servers
Clients
![Page 5: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/5.jpg)
April 20, 2023 CIS 118 Intro to UNIX
The Shell
Person
Operating System
SHELL
User types commands into shell
Run progra
m
Shell translates commands to machine code
1100101
0110010
![Page 6: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/6.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 7: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/7.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Interesting Commands
• Communication– write– mail– talk
• Useful– man– who– date– cal
• Printing– lpr– printer rm# file
• Network– ping– traceroute– nslookup– hostname
![Page 8: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/8.jpg)
April 20, 2023 CIS 118 Intro to UNIX
E-mail Commands
• mail: read/send mail
• pine: read mail
• forwardmail: forward mail
• blockmail: block mail
• procmail: proc[ess] mail
![Page 9: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/9.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 10: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/10.jpg)
April 20, 2023 CIS 118 Intro to UNIX
What’s on your server?
• List users online– users– who– last [user]– finger [user]
• FAS-specific– ph [full name]– rwho [user]
• What are people doing?– w– ps [aux]
• Managing your own processes– fg/bg– kill [process #]
![Page 11: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/11.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Communicating on UNIX
• write user[@machine]: send a one-way message
• talk user[@machine]: have a conversation
• mesg [y | n]: let people talk to you
![Page 12: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/12.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 13: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/13.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Hierarchical File System
b in
b in lo ca l
u sr e tc
a b
cd u an
d e
c
h o m e
/
/home/c/d/cduan
![Page 14: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/14.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Remote Home Directories
home05
home06
home07
is01
is02
smtp
webmail
![Page 15: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/15.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 16: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/16.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File System Commands
• Browsing commands
• File Manipulation Commands
• File Viewing/Editing Commands
![Page 17: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/17.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File Browsing
pwd print working directory
% pwd/home15/c/d/cduan
cd change directory
cd .. up 1 directory
% cd /usr/bin% pwd/usr/bin
ls list files
ll “long” listing
% lsfile1 file2 file3file4 file5 file6
![Page 18: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/18.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File Manipulation
• mv: move file(s)– mv file1 file2 rename file1 to file2– mv [file…] dir move files to directory
• cp: copy file(s)
• rm: remove file(s)
• mkdir: create a directory
• rmdir: remove a directory
![Page 19: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/19.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File Viewing/Editing
• cat, more, less, head, tail: view (parts of) files
• grep word [file…]: find words in files
• vi: edit files (see tutorial)– Or use that pico program
![Page 20: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/20.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX
• Basic Concepts
• Common Commands
• Multi-User Functions
• File System– Structure– Commands– Security
UNIX>_
![Page 21: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/21.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File System Security
Problem: multiple users, one machine
1. How do we keep data private?
2. How do we make data public?
3. How do we make data partially public?
![Page 22: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/22.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File System Security
Solution: UNIX permissions scheme
• Three levels of people– Self, group, others
• Three levels of protection– read, write, execute
![Page 23: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/23.jpg)
April 20, 2023 CIS 118 Intro to UNIX
File Permission Types
Level For Files For Directories
read Able to read file contents
Able to list files in
directory
write Able to modify file contents
Able to create/
remove files
execute
Able to run file as a program
Able to use files in
directory
![Page 24: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/24.jpg)
April 20, 2023 CIS 118 Intro to UNIX
User Permission Levels
• Self: yourself
• Group: members of pre-defined system groups (student, ua, etc.)– Generally not treated specially
• World: every user on the system
• Root can read/write everything!
![Page 25: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/25.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Viewing File Permissions: ll
-rwxr-xr-x 1 cduan ua ...
self grou
p
world
owner
group
read
write execut
e
No write permission for world
![Page 26: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/26.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Changing Permissions: chmod
Level Self Group World
read 4 4 4
write 2 2 2
execute 1 1 1+
chmod 755 [file…]
![Page 27: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/27.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Common chmod Values
Private file
Private directory
Public file
Public directory
Public directory, no listing files
600
700
644
755
711
![Page 28: November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f155503460f94c2a3fb/html5/thumbnails/28.jpg)
April 20, 2023 CIS 118 Intro to UNIX
Using UNIX: Final Remarks
• Where to get help– man pages– Internet– User Groups