Download presentation
Presentation is loading. Please wait.
1
Introduction to Unix Patrick Neary Niki Serakiotou
Information Technology Introduction to Unix Patrick Neary Niki Serakiotou Help Desk Short Courses Introduction to Unix
2
What do we mean “Unix”? Let us call it *IX then…
Information Technology What do we mean “Unix”? Flavors, depending on maker: SUN made SunOS,Solaris IBM made AIX, now uses SUSE SGI made IRIX Linux was open source as Redhat, now Ubuntu is Let us call it *IX then… Help Desk Short Courses Introduction to Unix
3
What do we mean “Unix”? Unix 6 and earlier GNU UNIX System V
Information Technology What do we mean “Unix”? Unix 6 and earlier GNU UNIX System V Microsoft Xenix BSD Minix GNU/Linux AIX SunOS FreeBSD NetBSD OpenBSD NeXT UnixWare Solaris Mac OS X Help Desk Short Courses Introduction to Unix
4
What we will cover in this course
Information Technology What we will cover in this course Concepts Usage Rice *IX environment Ideas on *IX administration Help Desk Short Courses Introduction to Unix
5
1. Concepts : Differences from other OSs
Information Technology 1. Concepts : Differences from other OSs Single User Multi tasking Shared resources No “services” Examples: Windows XP Multi User “Services” (printing, web, ftp etc) Examples: Solaris, SCO, misc Linuxes Mac OSX Windows server Desktop Other server Dumb terminal or Console Help Desk Short Courses Introduction to Unix
6
1. Concepts : Differences from other OSs
Information Technology 1. Concepts : Differences from other OSs Desktops Other server Dumb terminal or Console Talk to user by Login locally Talk to user by “RemoteDesktop” Talk to devices, using drivers Network Talk to the network using “daemons” and listening “ports” and using “protocols” Examples: sshd at port 22, httpd at 80, imapd at 143 etc Example: “ssh” is an application that talks to the sshd daemon on port 22. You need an application to talk to a demon. ssh tty Help Desk Short Courses Introduction to Unix
7
1. Concepts : Network services and ports
Information Technology 1. Concepts : Network services and ports # # Network services, Internet style tcpmux /tcp echo /tcp echo /udp discard /tcp sink null discard /udp sink null systat /tcp users daytime /tcp daytime /udp netstat /tcp chargen /tcp ttytst source chargen /udp ttytst source ftp-data /tcp ftp /tcp telnet /tcp smtp /tcp mail time /tcp timserver time /udp timserver name /udp nameserver domain /tcp bootps /udp bootpc /udp hostnames /tcp hostname pop /tcp pop-2 pop /tcp Port(service) 110/tcp “listens” for IP packets with 110/tcp in their header IP Packet Data Trailer header Network 110/tcp Server with port 110 “open” Help Desk Short Courses Introduction to Unix
8
1. Concepts : File systems local and remote
Information Technology 1. Concepts : File systems local and remote File systems (NFS, AFS, CIFS, SMB) Reading file systems (fsd) Mounting file systems (mountd) Exporting filesystems (exportd) Disk Local (boot) file system: Hard disk or CD, seen at boot Network Other local disk Fsd: This service handles local filesystems Mountd: This services Mounts remote filesystems Exportd: this service Handles filesystems that it exports to other machines Help Desk Short Courses Introduction to Unix
9
1. Concepts : File systems types and structure
Information Technology 1. Concepts : File systems types and structure Miscellaneous Disk Filesystems ADFS – Acorn's Advanced Disc filing system, successor to DFS. FATX – A modified version of Microsoft Windows FAT system that is used on the original Xbox console. PFS – and PFS2, PFS3, etc. Technically interesting file system available for the Amiga, performs very well under a lot of circumstances. Very simple and elegant. AdvFS - Advanced File System, designed by Digital Equipment Corporation for their Digital UNIX/Tru64 UNIX operating system. FFS (Amiga) – Fast File System, used on Amiga systems. This FS has evolved over time. Now counts FFS1, FFS Intl, FFS DCache, FFS2. Qnx4fs - File system that is used in QNX. ReiserFS – File system that uses journaling AFS (Not to be confused with Andrew File System, below) – Acer Fast Filesystem, used on SCO OpenServer Reiser4 – File system that uses journaling, newest version of ReiserFS FFS – Fast File System, used on *BSD systems AthFS - AtheOS File System, a 64-bit journaled filesystem now used by Syllable. Also called AFS Fossil – Plan 9 from Bell Labs snapshot archival file system. S51K – AT&T UNIX System V 1KB Filesystem, used by SCO OpenServer Files-11 – OpenVMS file system; also used on some PDP-11 systems; supports record-orientated files AFS - Ami File Safe, a commercial filesystem shipped on Amiga in the 90's (AFS is structure compatible with PFS) SpadFS - Linux - non-journaling, hashing lookup HFS – Hierarchical File System, used on older Mac OS systems. Successor to Macintosh File System (MFS) and predecessor to HFS+. SFS – Smart File System, journaling file system available for the Amiga platforms. BFS – the Be File System used on BeOS, occasionally misnamed as BeFS SkyFS - Developed for SkyOS to replace BFS as the operating system's main file system. It is based on BFS, but contains many new features. Btrfs - A filesystem based on B-Trees, created by Oracle Corporation. HFS Plus – Updated version of HFS, used on newer Mac OS systems. Also called HFS+. Recent versions allow journaling. CBMFS – The filesystem used on most Commodore 64-compatible floppy drives including the venerable 1541. HPFS – High Performance File System, used on OS/2 UDF – Packet based file system for WORM/RW media such as CD-RW and DVD. HTFS – High Throughput Filesystem, used on SCO OpenServer CMDFS – A filesystem extension added to CBMFS by Creative Micro Designs, for use in their 3.5 inch floppy drives, RAM disks, and hard drive controllers. ISO 9660 – Used on CD-ROM and DVD-ROM discs (Rock Ridge and Joliet are extensions to this) UFS – Unix File System, used on older BSD systems UFS2 – Unix File System, used on newer BSD systems JFS – IBM Journaling file system, provided in Linux, OS/2, and AIX. Supports extents. VxFS Veritas file system, first commercial journaling file system[citation needed]; HP-UX, Solaris, Linux, AIX DTFS – Desktop File System, featuring file compression, used by SCO OpenServer LFS – 4.4BSD implementation of a log-structured file system VLIR (Variable Length Indexed Record) – a filesystem extension added by Berkeley Softworks to CBMFS, allowing full random access read and write operations, for computers running GEOS. EAFS – Extended Acer Fast Filesystem, used on SCO OpenServer MFS – Macintosh File System, used on early Mac OS systems. Succeeded by Hierarchical File System (HFS). Extent File System (EFS) – an older block filing system under IRIX. Minix file system – Used on Minix systems WinFS - Windows Future Storage, currently still in beta and in use internally at Microsoft, it is planned as the successor to NTFS. It is uncertain whether it will be available as a service pack for Windows Vista or if it will be shipped with a later version of Windows. NILFS – Linux implementation of a log-structured file system ext – Extended file system, designed for Linux systems NTFS – (New Technology File System) Used on Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Windows Vista systems ext2 – Second extended file system, designed for Linux systems. ext3 – A journalled form of ext2. ext3cow – A versioning file system form of ext3. NetWare File System - The original NetWare 2.x - 5.x file system, used optionally by later versions. WAFL – Write Anywhere File Layout. High performance, log-structured like file system. WAFL heavily uses RAID 4, and NVRAM for transaction log replays. Used on Network Appliance systems ext4 – A new version of ext3, with support for extents. FAT – File Allocation Table, used on DOS and Microsoft Windows, 12-, 16- and 32-bit table depths. NSS – Novell Storage Services. This is a new 64-bit journaling file system using a balanced tree algorithm. Used in NetWare versions 5.0-up and recently ported to Linux. VFAT – Version of Microsoft Windows FAT system with extension to allow long (up to 255 character) filenames instead of only the 8.3 filenames allowed in the original FAT. XFS – Used on SGI IRIX and Linux systems OFS – Old File System, on Amiga. Nice for floppies, but fairly useless on hard drives. ZFS – Used on Solaris 10 and OpenSolaris, ported to FreeBSD 7.0 and to FUSE (not to be confused with zFS from IBM) STL (standard language file system) - a file system developed by IBM [1]. Help Desk Short Courses Introduction to Unix
10
1. Concepts : File systems types and structure
Information Technology 1. Concepts : File systems types and structure Network Distributed Filesystems 9P, the Plan 9 from Bell Labs and Inferno distributed file system protocol. One implementation is v9fs. No ACLs. Andrew File System (AFS) is scalable and location independent, has a heavy client cache and uses Kerberos for authentication. Implementations include the original from IBM (earlier Transarc), Arla and OpenAFS. Apple Filing Protocol (AFP) from Apple Computer. AFP may use Kerberos authentication. DCE Distributed File System (DCE/DFS) from IBM (earlier Transarc) is similar to AFS and focus on full POSIX file system semantics and high availability. Available for AIX and Solaris under a proprietary software license. NetWare Core Protocol (NCP) from Novell is used in networks based on NetWare. Network File System (NFS) originally from Sun Microsystems is the standard in UNIX-based networks. NFS may use Kerberos authentication and a client cache. Self-certifying File System (SFS), a global network file system designed to securely allow access to file systems across separate administrative domains. Server Message Block (SMB) originally from IBM (but the most common version is modified heavily by Microsoft) is the standard in Windows-based networks. SMB is also known as Common Internet File System (CIFS) or Samba file system. SMB may use Kerberos authentication. Help Desk Short Courses Introduction to Unix
11
1. Concepts : File systems types and structure
Information Technology 1. Concepts : File systems types and structure REMOTE (NETWORK) DISK PHYSICAL DISK 1 LOCAL DISKS / (root) PHYSICAL DISK 3 file usr bin var homeA homeB file user2 local bin user1 file PHYSICAL DISK 2 file file Help Desk Short Courses Introduction to Unix
12
1. Concepts : Shells vs. Windows
Information Technology 1. Concepts : Shells vs. Windows On a Unix like machine: The OS starts interfacing with the userwith ”shells”. Shells are command-line environments. Shells listen to commands and have a configuration file where one can set values to “variables” Windows Managers are “optional” applications on Unix. Login Shell: Prompt> command Command output … Prompt> On a Windows machine: The OS starts interfacing with the user with windows and GUIs available Help Desk Short Courses Introduction to Unix
13
1. Concepts : Processes vs. Task manager
Information Technology 1. Concepts : Processes vs. Task manager Task manager Process Management ps -ax PID TT S TIME COMMAND 0 ? T 0:11 sched 1 ? S 23:20 /etc/init - 2 ? S 0:01 pageout 3 ? S 3750:09 fsflush 71 ? S 0:00 /usr/lib/sysevent/syseventd 122 ? S 0:00 /usr/lib/picl/picld 233 ? S 0:00 /usr/sbin/sshd -R 235 ? S 0:03 /usr/sbin/sshd -R 236 ? S 0:04 ipmon -s 267 ? S 0:00 /usr/site/clamav/sbin/clamd 272 ? S 72:34 /usr/sbin/rpcbind 275 ? S 0:00 /usr/sbin/keyserv 283 ? S 294:53 /usr/lib/netsvc/yp/ypserv -d 285 ? S 6:29 rpc.nisd_resolv -F -C 8 -p t udp 290 ? S 0:00 /usr/lib/netsvc/yp/ypbind 293 ? S 0:00 /usr/lib/netsvc/yp/ypxfrd 298 ? S 0:00 /usr/lib/netsvc/yp/rpc.yppasswdd -D /var/yp -m 300 ? S 0:00 /usr/lib/netsvc/yp/rpc.ypupdated 319 ? S 2:29 /usr/sbin/inetd -s -r 335 ? S 0:03 /usr/lib/nfs/lockd 339 ? S 0:36 /usr/lib/nfs/statd Help Desk Short Courses Introduction to Unix
14
1. Concepts : Configuration files vs. menus
Information Technology 1. Concepts : Configuration files vs. menus Example of configuration file for exportd /usr/local # export to the world /usr clients # export to my clients /usr2 bonnie clyde # export to only these machines /usr anon=guest # map client root & anonymous to guest / ro # export the root filesystem /usr ro,nohide # export all local filesystems read-only /ng ro,access=%groupA:groupB # Two groups - A and B /nofoos -ro,access=-foo.bar.com:.bar.com # exclude foo, /d/local/src -rw,anon=guest,root=bonnie # multi-line example Notice: Different OS flavors May take different approaches To configuring processes Example: files vs. databases You need a GUI or to issue commands to configure a database Sample passwd File: root:5I2ESdPMj6rhc:0:1:Operator:/:/bin/csh daemon:*:1:1::/: sys:*:2:2::/:/bin/csh bin:*:3:3::/bin: uucp:*:4:8::/var/spool/uucppublic: sysdiag:*:0:1:Old System Diagnostic:/usr/diag/sysdiag:/usr/diag/sysdiag/sysdiag sundiag:*:0:1:System Diagnostic:/usr/diag/sundiag:/usr/diag/sundiag/sundiag nobody:NoLoginAllowed:-2:-2:Account with no privelege:/tmp:/bin/csh dao:dn2dbqtIcZ/9I:323:8006:Debbie Ortiz, :/home/sunclass1/dao:/bin/csh psn:1z.sMh0vow65w:7500:8008:Paul Norris, c-8, :/home/sunclass1/psn:/bin/csh pam:*:1016:8008:Pat Max:/home/sunclass1/pam:/bin/csh pav:B7SdcWEcSeKSU:1002:8006:Pat Vucenic:/home/sunclass1/pav:/bin/csh ths:6q3y/n8TQ:1059:8006:Ted Spitzmiller,081347,8006x33d:/home/sunclass1/ths:/bin/csh Help Desk Short Courses Introduction to Unix
15
in the Rice computing infrastructure.
Information Technology 1. Concepts : Connecting with other machines Some Unix parts in the Rice computing infrastructure. Network Storage (CIFS) Service: Authentication gh.owlnet.rice.edu Kennel.ruf.rice.edu Printer.rice.edu ldap.rice.edu mail1.rice.edu Mail Applications Printing Services: Mail, Storage,Web hosting. Apps ece.rice.edu math.rice.edu Mailboxes (MBX) Mount using SMB Using NFS “Owlnet” and “Ruf” Department Servers Student laptops Owlnet & College Labs Lab printers and plotters Lpd smbd Help Desk Short Courses Introduction to Unix
16
2. Usage : “Login in, working in the shell”
Information Technology 2. Usage : “Login in, working in the shell” Login Shell: Prompt> command Command output … Prompt> SSH Login Shell: Prompt> command Command output … Prompt> Login Shell: Prompt> command Command output … Prompt> Help Desk Short Courses Introduction to Unix
17
2. Usage : “Login in, working in the shell”
Information Technology 2. Usage : “Login in, working in the shell” SSH Or PuTTY Login Shell: Prompt> command Command output Prompt> Help Desk Short Courses Introduction to Unix
18
2. Usage : “Login in, working in the shell”
Information Technology 2. Usage : “Login in, working in the shell” From a Windows machine use: SSH Communications Suite for Windows (download from software.is.rice.edu) PuTTY (hint: Google putty) Run the program once downloaded Type in le.owlnet.rice.edu to “Host Name” box Hit “Open”, then type NetID, then password From an Apple OS machine use: Utilities / Terminal at the prompt type ssh then type password Help Desk Short Courses Introduction to Unix
19
2. Usage: Job control Unix allows you to run many things at once
Information Technology 2. Usage: Job control Unix allows you to run many things at once A program interacting with you is in the foreground If the program is running, but you still have shell control, it is in the background (One job in foreground at a time) Methods of interacting with your jobs <Ctrl>+C kills a running job <Ctrl>+Z backgrounds a running job jobs – Lists all jobs you have running fg %<num> – Brings job number <num> to foreground kill % <num> - Kills job number <num> Help Desk Short Courses Introduction to Unix
20
2. Usage: File and Directory permissions
Information Technology 2. Usage: File and Directory permissions Use ls -a to see hidden and normal files Use ls -l to see the permissions on files Gives you something like this: r = read, w = write, x = execute chown – Changes file’s owner/group chmod – Changes file’s permissions = normal file d = directory l = link User Group Other drwxrwxrwx Assign r=4, w=2, x=1 to get octal values: So, -r-xrw-w- is 562 Examples: drwxr-xr-x is …755 -r-xr--r-- is … 644 -r---w--wx is … 423 Help Desk Short Courses Introduction to Unix
21
2. Usage: Printers lpd printing daemon
Information Technology 2. Usage: Printers lpd printing daemon lpq –P <printer> - Lists jobs for printer Find printer Unix names from docs printer page Look at the Rank to find errors Delete all errored jobs to clear a print queue lprm –P <printer> <job> - Deletes job from printer Get job number from lpq Deleted jobs shouldn’t charge the account Help Desk Short Courses Introduction to Unix
22
2. Usage: manuals and google (teach yourself)!
Information Technology 2. Usage: manuals and google (teach yourself)! Man – command Example: man ls Google – how to do the task Example: how to list files in Rdehat linux Help Desk Short Courses Introduction to Unix
23
2. Usage: Environment and settings
Information Technology 2. Usage: Environment and settings Profiles, shells, variables Help Desk Short Courses Introduction to Unix
24
2. Usage: Handling files (editors, utilities)
Information Technology 2. Usage: Handling files (editors, utilities) Vi Grep Awk Help Desk Short Courses Introduction to Unix
25
in the Rice computing infrastructure.
Information Technology 3. Rice *X: What servers are available at Rice Some Unix parts in the Rice computing infrastructure. Network Storage (CIFS) Service: Authentication gh.owlnet.rice.edu Kennel.ruf.rice.edu Printer.rice.edu ldap.rice.edu mail1.rice.edu Mail Applications Printing Services: Mail, Storage,Web hosting. Apps ece.rice.edu math.rice.edu (NFS) Mailboxes (MBX) Mount using SMB Using NFS “Owlnet” and “Ruf” Department Servers Student laptops Owlnet & College Labs Lab printers and plotters Lpd smbd Help Desk Short Courses Introduction to Unix
26
3. Rice *X: Storage, home directories and
Information Technology 3. Rice *X: Storage, home directories and Things to be careful about! Help Desk Short Courses Introduction to Unix
27
4. *X administration: How to load your own Linux machine at Rice
Information Technology 4. *X administration: How to load your own Linux machine at Rice Help Desk Short Courses Introduction to Unix
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.