Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using UNIX Charles Duan FAS Computer Services June 12, 2016.

Similar presentations


Presentation on theme: "Using UNIX Charles Duan FAS Computer Services June 12, 2016."— Presentation transcript:

1 Using UNIX Charles Duan FAS Computer Services June 12, 2016

2 FAS Computer Services 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

3 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

4 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

5 June 12, 2016FAS Computer Services Multi-Computer, Multi-User Servers Clients

6 June 12, 2016FAS Computer Services The Shell Person Operating System SHELL User types commands into shell Run program Shell translates commands to machine code 1100101 0110010

7 June 12, 2016FAS Computer Services Starting a UNIX Shell Run through an SSH client –PuTTY, SecureCRT, NiftyTelnet Try it! –date, cal [ [month] year] Special Keys –Ctrl-C, Ctrl-D, Ctrl-Q, Ctrl-Z

8 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

9 June 12, 2016FAS Computer Services Interesting Commands Fun –weather –fortune Useful –man –apropos –date –cal Printing –lpr –enscript Network –ping –traceroute –nslookup –hostname

10 June 12, 2016FAS Computer Services E-mail Commands pine: read mail forwardmail: forward mail blockmail: block mail procmail: proc[ess] mail

11 June 12, 2016FAS Computer Services FAS/UA Commands fixfinger, fixdotfiles, fixwebfiles: when your account’s acting funny nofinger: keep people from finding you quota: how much disk space do I have left? usage: how much printing budget do I have left? sudo: special UA tools

12 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

13 June 12, 2016FAS Computer Services 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 #]

14 June 12, 2016FAS Computer Services 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

15 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

16 June 12, 2016FAS Computer Services Hierarchical File System /home/c/d/cduan

17 June 12, 2016FAS Computer Services Remote Home Directories home05 home06 home07 is01 is02 smtp webmail

18 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

19 June 12, 2016FAS Computer Services File System Commands Browsing commands File Manipulation Commands File Viewing/Editing Commands

20 June 12, 2016FAS Computer Services 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 % ls file1 file2 file3 file4 file5 file6

21 June 12, 2016FAS Computer Services 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

22 June 12, 2016FAS Computer Services File Viewing/Editing cat, more, less, head, tail: view (parts of) files grep word [file…]: find words in files vim: edit files (see tutorial) –Or use that pico program

23 June 12, 2016FAS Computer Services Using UNIX Basic Concepts Common Commands Multi-User Functions File System –Structure –Commands –Security UNIX>_

24 June 12, 2016FAS Computer Services 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?

25 June 12, 2016FAS Computer Services File System Security Solution: UNIX permissions scheme Three levels of people –Self, group, others Three levels of protection –read, write, execute

26 June 12, 2016FAS Computer Services File Permission Types LevelFor FilesFor Directories readAble to read file contents Able to list files in directory writeAble to modify file contents Able to create/ remove files executeAble to run file as a program Able to use files in directory

27 June 12, 2016FAS Computer Services 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!

28 June 12, 2016FAS Computer Services Viewing File Permissions: ll -rwxr-xr-x 1 cduan ua... self group worldownergroup read write execute No write permission for world

29 June 12, 2016FAS Computer Services Changing Permissions: chmod LevelSelfGroupWorld read444 write222 execute111 + chmod 755 [file…]

30 June 12, 2016FAS Computer Services Common chmod Values Private file Private directory Public file Public directory Public directory, no listing files 600 700 644 755 711

31 June 12, 2016FAS Computer Services Setting Up a Web Page ~cduan/ public_html/ index.html cgi-bin/ script.cgi 711 644 755 700! Remember: to read a file, you must be able to execute all higher directories!

32 June 12, 2016FAS Computer Services Using UNIX: Final Remarks Where to get help –man pages –Internet –UAs, full-time staff, UNIX Group Be safe, be secure, be careful Have fun using UNIX!

33 June 12, 2016FAS Computer Services


Download ppt "Using UNIX Charles Duan FAS Computer Services June 12, 2016."

Similar presentations


Ads by Google