Download presentation
Presentation is loading. Please wait.
Published byJuliana Flavell Modified over 10 years ago
1
POS/420 Philip Robbins – March 19, 2013 (Week 2) University of Phoenix Mililani Campus Introduction to Unix
2
Agenda: Week 2 Quiz #1 Due (Review & Grade) Week 2 -File Structure -Basic Terminal Commands -Permissions In Class Lab (Assignment) #1 Due Today Take Quiz #2
3
Review Week 1 List of Commands man – manual pages ls – list directory contents pwd – print working directory passwd – change password sudo – execute command as superuser su – login as superuser shutdown – shutdown
4
Linux File System Structure
6
root (/)
7
File Structure: Binaries Whats the difference between: -/bin -/sbin -/usr/bin -/usr/sbin
8
File Structure: Binaries Whats the difference between: /bin & /usr/bin When UNIX was first written, /bin and /usr/bin physically resided on two different disks: /bin being on a smaller faster (more expensive) disk, and /usr/bin on a bigger slower disk.
9
/bin Essential User Command Binaries -Contain commands used by both system administrators and users. -There must be no subdirectories in /bin.
10
/boot Static files of the boot loader -Contains everything for the boot process (at boot time). -Does not include boot configuration files not needed at boot time. -Stores data that is used before the kernel begins executing. -OS Kernel is stored in either / or /boot.
11
/dev Device Files -Location of special or devices files.
12
/etc Host-specific system configuration -Contains configuration files. -Must be Static and cannot be an executable binary. -Required in /etc: opt, X11, sgml, xml
13
/etc
14
/srv Data for services provided by this system. - Contains site-specific data which is served by this system. - Naming methodology not specified. -e.g. /srv/ftp, /srv/pos420/www -Data that is of interest to a specific user should go into that users home directory.
15
/tmp Temporary Files -Must be made available for programs that require the use of temporary files. -Recommend that /tmp files be deleted upon system reboot.
16
/usr User Hierarchy -Second major section of the file system. -Used for shareable, read-only data. -Required directories: bin- essential command binaries sbin- essential system binaries include- header files used by C programs lib- object files, binaries, libraries local- put apps you build yourself here share- shared (Static)
17
/usr Whats the difference between: /usr & /usr/local
18
/usr/share/man Directory for System Manual Pages man1: User programs Manual pages that describe publicly accessible commands are contained in this chapter. Most program documentation that a user will need to use is located here. man2: System calls. This section describes all of the system calls (requests for the kernel to perform operations). man3: Library functions and subroutines. Section 3 describes program library routines that are not direct calls to kernel services. This and section 2 are only really of interest to programmers. man4: Special files. Section 4 describes the special files, related driver functions, and networking support available in the system. Typically, this includes the device files found in /dev and the kernel interface to networking protocol support.
19
/usr/share/man Directory for System Manual Pages man5: File formats. The formats for many data files are documented in the section 5. This includes various include files, program output files, and system files. man6: Games. This chapter documents games, demos, and generally trivial programs. Different people have various notions about how essential this is. man7: Miscellaneous. Manual pages that are difficult to classify are designated as being section 7. The troff and other text processing macro packages are found here. man8: System administration. Programs used by system administrators for system operation and maintenance are documented here. Some of these programs are also occasionally useful for normal users.
20
/usr/share/man Manual Section Summary
21
man apropos
22
apropos
23
man6: Games. This chapter documents games, demos, and generally trivial programs. Different people have various notions about how essential this is.
24
/var Variable Hierarchy -Contains variable data files. -Spool files & directories, logging data, temporary files (for system reboots). -Not Shareable. -e.g. /var/log, /var/mail, /var/cache, /var/crash (dump files) -Can be placed in /usr/var. (If separate partition for /var is not possible).
25
/var Use the more command to view files. -man more for more information -view syslog -view kern.log Also use the head and tail command to view files. -man head & tail for more information -know how to head & tail –n lines of a file
26
/proc Kernel and process information virtual file system -Used for handling process and system information -Kernel and memory information
27
man ps
28
top
29
FHS Compliant System Rationale: -Not all files can be shared -Static and Variable files should be segregated -Static files can be stored on read-only media -Different backup schedules
30
man fdisk
31
sudo fdisk -l Use fdisk to list all partitions (as root)
32
fdisk
33
Typical Partitions
34
Virtual Terminals (TTY) Six tty (1 – 6) -Hold Ctrl + Alt, press F1 (for tty1) -F2 (for tty2) … F6 (for tty6) -Hold Ctrl + Alt, press F7 (to return to GUI) -Press and hold Ctrl + Alt to switch between VM and GUI
35
who
37
User ($) vs. Root (#)
38
Shells What is an OS shell? Types -ksh, tcsh, csh, sh, bash What shell are you running? -echo $SHELL
39
Shells csh
40
man usermod
41
man ssh
42
ssh
43
Directory Notation / -Represents a directory /. -Represents current directory /.. -Represents the parent directory /~ -Represents a users home directory
44
File Permissions
45
Octal (numerical) Representation
46
man chmod
47
man chown
48
man chgrp
49
File Permissions Command Summary
50
Run Levels runlevel -Previous runlevel, current runlevel init -Change between run levels (process id 1) telinit -Change system run level (user process)
51
runlevel
52
vi (text editor)
53
Review essential user commands (/bin)
54
Break Lets take a break… RETURN @ 800PM
55
Assignment #1 30 Questions Use PrintScreen (PrtSc) Work in groups (optional) Submit individual assignments! Post to OLS. -- use pdf format. Due before you leave class tonight.
56
Quiz: Week 2 10-15 minutes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.