What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Just like DOS or Windows.

Slides:



Advertisements
Similar presentations
Linux Orientation Computer Systems Lab Computer Sciences Department Room 2350.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
1 Introduction to UNIX Ke Liu
Working with Files How to create, view, copy, rename and print files.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
IWS (Instructional Work Servers) There are 4 instructional Unix servers: –ceylon, fiji, sumatra, and tahiti Accessing the servers: –Terminal Programs:
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Just like DOS or Windows.
IWS (Instructional Work Servers) There are 4 instructional Unix servers: –ceylon, fiji, sumatra, and tahiti Accessing the servers: –Terminal Programs:
What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Looks like DOS…but more powerful.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
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.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
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.
Working with Files Chapter 5. Display a Calendar Display a calendar for a specific month – cal Display a calendar for a specific year – cal 2000.
Introduction to Unix Bent Thomsen Institut for Datalogi Aalborg Universitet.
Introduction to Unix Bent Thomsen Institut for Datalogi Aalborg Universitet.
Unix Basics Chapter 4.
Basic unix commands that everyone should know (Even if you have a mac) Slightly more advanced:
Linux+ Guide to Linux Certification, Second Edition
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
CS240 Computer Science II Introduction the Unix File System and File Related Utilities Based on “UNIX for Programmers and Users” by G.Class and K. Ables.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: whereis, which, whoami, finger, passwd, cal, date Working with Files: cat, more, less.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Introduction to Programming Using C An Introduction to Operating Systems.
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
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.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
Learning basic Unix command It 325 operating system.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Tutorial of Unix Command & shell scriptS 5027
CS1010: Intro Workshop.
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
IWS (Instructional Work Servers)
Operating Systems and Using Linux
IWS (Instructional Work Servers)
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Introduction Paul Flynn
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Tutorial Unix Command & Makefile CIS 5027
What is Unix? A multi-user networked operating system
Lab 2: Terminal Basics.
Presentation transcript:

What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Just like DOS or Windows –“Networked” Designed for server use Networking is an intrinsic part of the system –“Multi-user” Every user has different settings and permissions Multiple users can be logged in simultaneously Tons of fun!!! This tutorial provided by UW ACM Questions to

IWS (Instructional Work Servers) There are 4 instructional Unix servers: –ceylon, fiji, sumatra, and tahiti Accessing the servers: –Terminal Programs: telnet (insecure; cannot be used) ssh (via the TeraTerm or Putty programs) –Start -> Program Files -> Desktop Tools -> TeraTerm –File Transfer Programs ftp (insercure; cannot be used at UW) \\ \ –Start -> Run –e.g -- \\fiji\zanfur Secure file transfer (from C&C) –XWindows Come to the ACM tutorial!

Logging In Which server you use (almost) doesn’t matter – all four allows access to your files Although your Windows and Unix usernames (and passwords) are the same, they are two separate accounts –Your z: drive is not your Unix account Connecting: –We’ll connect to the Unix machines via ssh –After connection, you are presented with a login prompt –After logging in, you’re placed in your home directory (where your personal files are located)

The Command Prompt Commands are the way to “do things” in Unix A command consists of a command name and options called “flags” Commands are typed at the command prompt In Unix, everything (including commands) is case-sensitive [prompt]$ fiji:/u15/awong$ ls –l -a unix-tutorial Command Prompt Command (Optional) flags (Optional) arguments Note: In Unix, you’re expected to know what you’re doing. Many commands will print a message only if something went wrong.

Two Basic Commands The most useful commands you’ll ever learn: –man (short for “manual”) –info They help you find information about other commands –man or info retrieves detailed information about –man –k searches the man page summaries (faster, and will probably give better results) –man –K searches the full text of the man pages fiji:/u15/awong$ man –k password passwd(5) - password file xlock(1) - Locks the local X display until a password is entered fiji:/u15/awong$ passwd

Directories In Unix, files are grouped together in other files called directories, which are analogous to folders in Windows Directory paths are separated by a forward slash: / –Example: /u10/hctang/classes/cse326 The hierarchical structure of directories (the directory tree) begins at a special directory called the root, or / –Absolute paths start at / Example: /u10/hctang/classes/cse326 –Relative paths start in the current directory Example: classes/cse326 (if you’re currently in /u10/hctang ) Your home directory is where your personal files are located, and where you start when you log in. –Example: /u10/hctang

Directories (cont’d) Handy directories to know ~ Your home directory.. The parent directory. The current directory ls –LiSts the contents of a specified files or directories (or the current directory if no files are specified) –Syntax: ls [ … ] –Example: ls backups pwd –Print Working Directory

Directories (cont’d further) cd –Change Directory (or your home directory if unspecified) –Syntax: cd –Examples: cd backups/unix-tutorial cd../class-notes mkdir –MaKe DIRectory –Syntax: mkdir –Example: mkdir backups class-notes rmdir –ReMove DIRectory, which must be empty –Syntax: rmdir –Example: rmdir backups class-notes

Files Unlike Windows, in Unix file types (e.g. “executable files, ” “data files,” “text files”) are not determined by file extension (e.g. “foo.exe”, “foo.dat”, “foo.txt”) Thus, the file-manipulation commands are few and simple … rm –ReMoves a file, without a possibility of “undelete!” –Syntax: rm –Example: rm tutorial.txt backups/old.txt

Files (cont’d) cp –CoPies a file, preserving the original –Syntax: cp –Example: cp tutorial.txt tutorial.txt.bak mv –MoVes or renames a file, destroying the original –Syntax: mv –Examples: mv tutorial.txt tutorial.txt.bak mv tutorial.txt tutorial-slides.ppt backups/ Note: Both of these commands will over-write existing files without warning you!

Shell Shortcuts Tab completion –Type part of a file/directory name, hit, and the shell will finish as much of the name as it can –Works if you’re running tcsh or bash Command history –Don’t re-type previous commands – use the up-arrow to access them Wildcards –Special character(s) which can be expanded to match other file/directory names * Zero or more characters ? Zero or one character –Examples: ls *.txt rm may-?-notes.txt

Editing Text Which text editor is “the best” is a holy war. Pick one and get comfortable with it. Three text editors you should be aware of: –pico – Comes with pine ( Dante ’s program) –emacs/xemacs – A heavily-featured editor commonly used in programming –vim/vi – A lighter editor, also used in programming

Printing Printing: –Use lpr to print Use –h (no header) and –Zduplex (double-sided) to save paper –Check the print queue (including Windows print jobs!) with lpq –lprm to remove print jobs (including Windows print jobs) –For the above commands, you’ll need to specify the printer with –P Check out enscript (quizlet: how do you find information about commands?) to print text files nicely! –WARNING: Do NOT use enscript with postscript files!

Programs and Compilation To compile a program: –g++ –Recommended: g++ -Wall –ansi –o *.cpp -Wall – Warnings: ALL -ansi – Strict ANSI compliance Quizlet: what does *.cpp mean? What’s an “executable”? –In Windows, double-clicking on an icon runs a program E.g. double-click on C:\Windows\notepad.exe –In Unix, you can run your executable from the command line! Type the executable name at the prompt, just like a command –In fact, commands are actually executables However, you may need to specify the path to your executables –./ runs in the current directory Example: ceylon:ehsu% g++ -Wall –ansi –o hello hello.cpp ceylon:ehsu%./hello