Download presentation
Presentation is loading. Please wait.
1
Introduction to UNIX A User’s Perspective: Day 1 – The File System
2
Requirements for System Access Authentication – User account – Password
3
Connecting to the System Telnet & FTP – Insecure Clear-Text Transfer of ALL data – Resident on most systems SSH & SFTP – Secure Encrypted transfer of ALL data – Free download from ftp://ftp.ssh.com/pub/ssh/ftp://ftp.ssh.com/pub/ssh/ SSHSecureShellClient-3.2.2.exe
4
Let’s Log On! Hand out Account Sheets Logon to the System
5
What You Will See…
6
Now Do It Securely
7
Success!!
8
Maneuvering on the Command-Line Esc – k – First enter in command history – k to move UP through history j = Down l = Left h = Right i = Insert x = Delete Shift-U = Undo ESC when in trouble ;)
9
The Windows/UNIX difference Capable of getting under the hood – Windows – Difficult The Registry – Nuff said! – UNIX – Manageable Configuration files Fundamental knowledge expandable
10
What we will Cover Today Definition of UNIX (2 slides!) UNIX File System Basic Commands Ownership & Permissions Shells
11
UNIX What is it? Multi-user System File based system Extensible Honed for networking Portable – runs on anything
12
UNIX Distributions Linux – Redhat, Mandrake, SuSe, etc. AIX – IBM Solaris – SUN HP-UX – HP
13
What Should You Know? How to Log on and off of a UNIX system – How the process works
14
Question? Anyone… anyone?
15
Now that you are logged in… Account Shells – csh – C-Shell % – ksh – Korn $ – bsh – Bourne Shell $ – Bash – Bourne Again Shell #
16
C-Shell – csh Interactive command interpreter Command programming language Syntax similar to the C programming language /bin/csh or /usr/bin/csh – Executes /etc/profile OR /etc/login $HOME/.login OR $HOME/.cshrc
17
The Korn Shell – ksh Interactive command interpreter Command programming language Backwards compatible with the Bourne Shell Many C-shell features /bin/ksh or /usr/bin/ksh – Executes /etc/profile $HOME/.profile
18
Bourne Shell – bsh Interactive command interpreter Command programming language Allows for a restricted shell /bin/bsh or /usr/bin/bsh – Executes /etc/profile $HOME/.profile
19
Bourne Again SHell – bash Compatible with Bourne shell Enhanced feature set – Command-line editing – Line completion, etc. FREE! /bin/bash or /usr/bin/bash – Executes /etc/profile or /etc/bashrc $HOME/.bash_profile or $HOME/.bashrc $HOME/.bash_logout
20
Shell Execution Illustrated
21
Shells, Why Do I Care? Dictates mode of operation Allow for individual system customization
22
Your Ambassador Interface to the Kernel – Command Interpreter Abstracts system level details What does this mean?
23
Interaction Details
24
What Should You Know? How to Log on and off of a UNIX system – How the process works What UNIX shells are – How they function in relation to the system – Some of their features
25
Question? Anyone… anyone?
26
The File System It’s a Directory Tree – / = root directory Windows Equivalent = C:\ – The / serves as a directory delimiter Can be mounted from anywhere Everything is a file!
27
File System Commands ls – LiSt current directory cd – Change Directory pwd – Present Working Directory rm – ReMove = DELETE
28
File Types Regular Files – Any file that can hold data, source code, binaries… Directory Files – Special files that contain information about other files (location). Soft/Symbolic Link “Files” – Contains a path to another file Hard Link “Files” – Creates a link to the files inode
29
Special Function File Types Device Files – Character Devices – Block Devices – Unix-Domain Sockets
30
Regular File Creation FTP (get) touch Editor (vi, pico, etc.) cat echo
31
Directory File Creation mkdir mv cp
32
Soft/Symbolic Link File Creation ln –s – $ ln -s out.echo echo.out – lrwxrwxrwx msaba user echo.out -> out.echo – -rw------- msaba user out.echo Can be made across file systems
33
Hard Link File Creation ln – $ ln echo.out out.echo -rw------- 2 msaba user 12 Dec 10 09:04 echo.out -rw------- 2 msaba user 12 Dec 10 09:04 out.echo – $ ls -ial 952410 echo.out 952410 out.echo Can not be made across file systems
34
File System Structure
35
What Should You Know? How to Log on and off of a UNIX system – How the process works What UNIX shells are – How they function in relation to the system – Some of their features The different UNIX file types The structure of the UNIX file system
36
Question? Anyone… anyone?
37
Traversing the PATH Hierarchical – Directory Tree – Parent/Child Nodes Absolute – The full PATH /usr/local/ssh2/bin/ssh Relative – pwd = /usr/local/bin –../local/ssh2/bin/ssh Simple – ssh
38
PATH UNIX PATHs – A colon delimited list of directories the shell uses when finding a command issued with a simple PATH. echo $PATH – Lists all of the directories the system will “look” in when a command is issued which “command-name” – Outputs the absolute PATH of the command if known
39
PATH Shortcuts Shortcuts to your Home Directory root – cd ~ – cd ~user-name – cd $HOME Absolute Path Shortcuts – * A wildcard that matches any character cd /usr/l*/ss*
40
What Have We Covered? What UNIX is Logging onto UNIX UNIX Shells File Types Structure of the File System PATH
41
What Should You Know? How to Log on and off of a UNIX system – How the process works What UNIX shells are – How they function in relation to the system – Some of their features The different UNIX file types The structure of the UNIX file system UNIX PATHS – How to navigate around the UNIX file system
42
Question? Anyone… anyone?
43
Permissions – Power in Play Everything in UNIX is a File Every file in UNIX has associated permissions – Ownership Three Ownership Tiers – User – Group – “The World” – Controls Three Control Tiers per Ownership – Read – Write – Execute
44
Master of Your Domain Viewing Permissions – ls –al drwx------ 4 msaba user 512 Dec 10 09:55. drwxr-xr-x 27 msaba user 4096 Dec 10 09:04.. drwx------ 2 msaba user 512 Dec 10 09:07 dir-test lrwxrwxrwx 1 msaba user 8 Dec 10 09:18 echo.out -> out.echo -rw------- 2 msaba user 12 Dec 10 09:04 out.echo
45
A Closer Look Example Data drwxr-xr-x.. drwx------ dir-test lrwxrwxrwx echo.out -> out.echo First column – File type Next three sets of three columns…?! – Permission definitions for different ownerships
46
Binary Versus Alpha Thinkers Binary Thinkers & Permissions – Think in terms of 0s and 1s 0 = off/false 1 = on/true – Convert it to decimal…Easy!! Alpha Thinkers & Permissions – Think in terms of u,g,o,a and r,w,x Add permissions with a + Remove permissions with a –
47
Actually Making a Change Grant/Change permissions – chmod http://sp.uconn.edu/~msaba/sysadmin/Fpermissionstable.html http://sp.uconn.edu/~msaba/sysadmin/FilePermissions.html Changing ownership – chown user:group file
48
What Should You Know? How to Log on and off of a UNIX system – How the process works What UNIX shells are – How they function in relation to the system – Some of their features The different UNIX file types The structure of the UNIX file system UNIX PATHS – How to navigate around the UNIX file system UNIX ownership and permissions
49
Question? Anyone… anyone?
50
THANK YOU FOR ATTENDING Please fill out the Evaluation Form before leaving.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.