UNIX Introduction Caryl Rahn.

Slides:



Advertisements
Similar presentations
RH030 Linux Computing Essentials
Advertisements

A Guide to Unix Using Linux Fourth Edition
A Guide to Unix Using Linux Fourth Edition
Pre-Assessment Questions
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
Chapter One The Essence of UNIX.
1 Introduction to UNIX Ke Liu
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Lesson 22 – Introduction to Linux Systems Administration.
The UNIX File System.
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
1. This presentation covers :  User Interface Administration  Files System and Services Management 2.
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Guide To UNIX Using Linux Fourth Edition
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Manage Directories and Files in Linux
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Introducing UNIX EMBnet slide 1 Introducing the UNIX Operating System.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Introduction to Unix/Linux Chapter One The Essence of UNIX.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Unix Basics Chapter 4.
An Introduction to UNIX System --- Cosc513 Presentation n Instructor: Morteza Anvari n Author: Yonghong Pan n ID#: n Date: Jan.29, 2001.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
CENT 305 Information Systems Security Linux Introduction.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
Introduction to Programming Using C An Introduction to Operating Systems.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
Linux Commands C151 Multi-User Operating Systems.
Chapter 9: Networking with Unix and Linux. Objectives: Describe the origins and history of the UNIX operating system Identify similarities and differences.
SUSE Linux Enterprise Desktop Administration Chapter 7 Manage Directories and Files.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II FILES AND FILE SYSTEM STRUCTURE.
UNIX Introduction Caryl Rahn 1. UNIX and Linux  Backround  Layers of a UNIX System  Function of UNIX Shells  Options for Connecting to a UNIX System.
Overview of Linux Fall 2016 Dr. Donghyun Kim
Welcome to Linux Chap#1 Hanin Abdulrahman.
Chapter 6 File Systems CSNB113 SYSTEM ADMINISTRATION
C151 Multi-User Operating Systems
9 Linux on the Desktop.
Chapter 1 The Essence of UNIX and Linux
An Introduction to UNIX System --- Cosc513 Presentation
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Web Programming Essentials:
Linux Professor Sabol.
Welcome to Linux Chap#1 Hanin Abdulrahman.
Welcome to Linux Chap#1.
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
Presentation transcript:

UNIX Introduction Caryl Rahn

UNIX and Linux Backround Layers of a UNIX System Function of UNIX Shells Options for Connecting to a UNIX System Syntax used for Entering UNIX Commands Role of the System Administrator Log On and Log Out Redirection Symbol

Introducing the UNIX Operating System UNIX is a multi-user system Lets many people simultaneously access and share the resources of a server computer UNIX is a multitasking system Lets one user execute multiple programs UNIX is also a portable operating system Can be used in a variety of computing environments (different types of hardware) It is the only operating system that spans all classes of computers from mainframes to PDAs.

    UNIX Concepts Microsoft DOS and Microsoft Windows adopted original UNIX design concepts, such as the idea of a shell--an interface between the user and the operating system--and the hierarchical structure of directories and subdirectories The kernel is the base operating system, which interacts directly with the hardware and services the user programs

Linux as it relates to UNIX Berkeley Software Distribution (BSD) University of Berkeley students System V Bell Laboratories Requires License

    Unix Concepts - Layers The kernel is only accessible through kernel mode - reserved for system administrator This prevents unauthorized commands from invading the foundation layer or the hardware that supports the entire UNIX structure User mode provides access to higher layers where all application software resides

    Layers of a UNIX System

Functions of UNIX Shells Used to Communicate between the user and the Operating System Two major types of Shells GUI – Graphical User Interface CLI – Command Line Interface

Graphical User Interface GUI X Windows System Common Desktop Environment – CDE Fast Virtual Window Manager (fvwm) – Linux Open Look Window Manager (olwm) – Sun Microsystems K Desktop Environement – KDE Open Windows

Command Line Interface CLI You choose a shell when the system administrator sets up your user account Most users choose the Bash shell, although you can choose any of these: Bourne Shell (sh) – first one at AT&T C Shell (csh) – C programmers like this one TC Shell (tcsh) – derived from the C shell Korn Shell (ksh) - includes many extensions, such as a history feature that lets you use a keyboard shortcut to retrieve commands you previously entered Bourne again Shell (bash) - Linux

Startup Scripts $HOME/.xsession $HOME/.xinitrc xterm window X window System Display Manager (xdm) $HOME/.xinitrc X window System Initializer (xinit) xterm window Controlled by the shell in the SHELL environment variable

Options for Connection to a UNIX System Workstation Usually run versions of UNIX specifically for that workstation - Sun-OS, Solaris, HP_UX Personal Computer There are several versions of UNIX that run on PC’s - Solaris, UNIXware, XENIX Linux works on both Dumb Terminal X Terminal

Making the Connection LAN Connection Telnet Connection Appears as if the local computer is running UNIX Telnet Connection A client program connects to a telnet server running on the UNIX system. Appears like a dumb terminal Can run over a Network Connection or a modem

Connecting to UNIX via Telnet Telnet is a terminal emulation program for the Internet Internet Protocol (IP) address Domain name such as ocelot.aul.fiu.edu

Syntax used for Entering UNIX Commands UNIX is Case Sensitive! Launch Applications from the CDE CLI Syntax Enter the program (command) on the command line ls –l vi myfile.txt

Role of the System Administrator Sets up access and permissions for Users of the System You can log on to any UNIX or Linux system as long as you have a user account and password on the host (server) computer Perform System Backups Install and Upgrade Programs a.k.a. superuser

The System Administrator Continued The system administrator has a unique user name: root The system administrator owns the root account, which means no one else can be assigned to that account The password for the root account is confidential; only the system administrator and a back-up person know it

The System Administrator Command Line The system administrator’s prompt is the # (pound) symbol The UNIX system generates a default setting for the command prompt for the system administrator in the following format: [root@hostname]#

The Ordinary User Command Line The $ (dollar sign) is traditionally associated with ordinary users The UNIX system generates a default setting for the command prompt for ordinary users in the following format: [user name@hostname]$

Users and Groups /etc/passwd /etc/group Contains user login name Password is encrypted There is a User ID number (UID) that is unique, set by the System Administrator Has the users primary group ID Has the users home directory Has the users logon shell /etc/group Contains groups and their members

Setting File Permissions A directory listing gives you the access permissions for a file. The first character of file type can be d – directory b,c or p for devices A hyphen means it is a file chmod ugoa =+- rwx filename

File Permission Codes Diagram on Previous Slide d Indicates the file type (d=directory) r File’s owner has read permission w File’s owner has write permission x File’s owner has execute permission (can run the file as a program) r Group has read permission - Group does not have write permission x Group has execute permission r Others have read permission - Others do not have write permission x Others have execute permission

Entering Commands ls –alt /usr/users/* UNIX is case-sensitive You type most UNIX commands in lowercase You must know a command’s syntax Syntax Command options arguments ls –alt /usr/users/*

    Multiple Commands You may type more than one command on the command line by separating each command with a semicolon(;) When you press Enter, UNIX executes the commands in the order you entered them

Command Line Entry Continued The clear Command You can use the clear command to clear your screen; it has no options or arguments The Command-line History You can access the command history with the up and down arrow keys Pressing the up arrow key once recalls the most recently used command Each time you press the up arrow key, you recall an older command

Commonly Used Shell Commands - man All UNIX systems include man pages Online help manual Syntax man ls This is probably the most important command to learn!

    man Pages Name: the name of the command and a short statement describing its purpose Synopsis: a syntax diagram showing the usage of the command Description: a more detailed description of the command than the name item gives Options: a list of command options and their purposes See Also: other commands or man pages that provide related information Bugs: a list of the command’s known bugs

Commonly Used Shell Commands - logout Logging out ends your current process and indicates to UNIX that you are finished How you log out depends on the shell you are using exit logout

Commonly Used Shell Commands - passwd passwd command new password must differ from the old password by at least three characters password must have more than five characters at least two letters and one number password is different from your user name

Commonly Used Shell Commands Three UNIX commands let you view the contents of files: cat, more, and less The more and less commands display a file, one screenful at a time, while the cat command displays the whole file at once Two other commands, head and tail, let you view the first few or last few lines of a file

Commonly Used Shell Commands - cal cal calendar of the current month cal –j 2000 julian date format cal august 2002 calendar of august, 2002

Commonly Used Shell Commands - date date today’s date date –u system date

Commonly Used Shell Commands - who who –h Displays remote users logged in who –i Shows idle time for each user who –iH List of login names and total # who -q Your username and what terminal you are logged into

More Commonly Used Shell Commands pwd – print working directory cd ls touch whatis clear find

Redirection Symbol > cat > myfile.txt >> Ctrl D

The UNIX File System Standard Tree Structure Partitions Mount Paths and Pathnames Creating Directories Copying Files Setting File Permissions

A Typical UNIX Directory Tree

A Typical Linux Directory Tree Root file system (/) /usr sbin /boot bin dev root /var /home lib mnt etc /swap /opt /tmp

UNIX File Types Everything looks like a file to UNIX There are 4 Types of Files Binary Files Text Files Links Device Files

Partitions Can have one or more partitions Root partition Having different partitions protects your data Root partition /etc and /bin Partition for users home directories Other partitions /home /var /tmp /usr /swap

The Swap Partition Swap partitions support virtual memory swap partitions prove space on disk that acts like an extension of physical memory The system can use it to swap information between disk and RAM The rule of thumb is: Swap space = 3 x RAM

The /bin and /boot Directories The /bin Directory The /bin directory contains binaries, or executables, the programs needed to start the system and perform other essential system tasks The /boot Directory The /boot directory often contains the files that the bootstrap loader (the utility that starts the operating system) needs and the kernel (operating system) images

The /dev Directory The /dev Directory Files in the /dev are device drivers, which access system devices and resources such as hard disks, the mouse, printers, consoles, modems, memory, floppy disks, and the CD-ROM drive The device files are divided into two major classifications: block and character types

The /etc Directory The /etc directory contains configuration files the system uses when the computer starts Most of this directory is reserved for the system administrator, and it contains system- critical information stored in files: psswrd, the user database (passwd) rc, scripts or directories of scripts to run when the system starts Fstab, lists of file systems mounted automatically when the system starts group, the user group database

The /lib Directory This directory houses the shared library images, files that programmers generally use to share code in the libraries rather than creating copies of this code in programs This makes the programs smaller and faster Many files in this directory are symbolic links to files in system libraries A symbolic link is a name that points to and lets user access a file located in a directory other than the current directory

The /mnt and /proc Directories The /mnt Directory Mount points for temporary mounts by the system administrator reside in the /mnt directory This directory is often divided into subdirectories such as /mnt/cdrom and /mnt/floppy, to clearly specify device types The /proc Directory The /proc directory occupies no space on the disk: it is a virtual file system allocated in memory only

The /root and /sbin Directories The /root Directory The /root directory is the home directory for the user root, usually the system administrator The /sbin Directory The /sbin directory is reserved for the system administrator

The /tmp Directory The /tmp Directory Many programs need a temporary place to store data during processing cycles The traditional location for these files is the /tmp directory

Mount The root(/) file system is mounted by the kernel when the system starts Other file systems can be attached to your system using the mount command The mount point is an empty directory The mount command maps the new file system to the mount point

Mount Continued The system administrator uses the mount command to mount a file system Syntax: mount device-name mount-point mount –t cdfs –r /dev/cdrom /mnt/cdrom Mounts the cdrom mount /dev/fd0 /mnt/floppy Mounts the floppy disk df – lists all mounted file systems

Paths and Pathnames Absolute Pathnames Relative Pathnames Begins at the root level and lists all subdirectories to the destination file Relative Pathnames Starts from the current point A forward slash (/) separates each directory name

Miscellaneous File Info . – current directory .. – up one directory * – wildcard matches anything

Creating Directories mkdir – can create one or more directories rmdir – remove one or more directories Be very careful deleting files and directories, they are really gone.

Copying Files cp source_file target_file cp temp/listofnames save Copies the file called listofnames from the temp directory to the save directory Common options for cp -p keep the modification date & time -i interactive mode -r copy all files and subdirectories