1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

Using Commands Introduction to Linux June 16, 2009 Papeete, French Polynesia Hervey Allen.
1 Introduction to UNIX Ke Liu
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.
Linux+ Guide to Linux Certification, Second Edition
1 Some basic Unix commands u Understand the concept of loggin into and out of a Unix shell u Interact with the system in a basic way through keyboard and.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
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.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
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”
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
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.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
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.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Lesson 2-Touring Essential Programs. Overview Development of UNIX and Linux. Commands to execute utilities. Communicating instructions to the shell. Navigating.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Introduction to Unix – CS 21 Lecture 4. Lecture Overview * cp, mv, and rm Looking into files The file command head and tail cat and more What we’ve seen.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
UNIX An Introduction. Brief History UNIX UNIX Created at Bell Labs, 1969 Created at Bell Labs, 1969 BSD during mid 70s BSD during mid 70s AT&T began offering.
1 SEEM3460 Tutorial Compiling and Debugging C programs.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Introduction to Programming Using C An Introduction to Operating Systems.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
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.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
The Unix File sytem. Introduction Tree structure …
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
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.
Introduction to UNIX and Linux.  Written by Dennis Ritchie and Ken Thomsom at Bell Labs in 1969  Initially written in assembly language and a high-level.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
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.
SEEM3460 Tutorial Unix Introduction.
Getting started with CentOS Linux
Chapter 11 Command-Line Master Class
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 Linux Operating System
Command Line Interface for Beginners
Introduction to Linux Week 0 - Thursday.
SEEM3460 Tutorial Unix Introduction Xinshi Lin & Zihao Fu
Operating Systems Lecture 5.
Introduction Paul Flynn
Getting started with CentOS Linux
Command line.
Lab 2: Terminal Basics.
Presentation transcript:

1 SEEM3460 Tutorial Unix Introduction

2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software Ever Written!! eArticle.jhtml?articleID= eArticle.jhtml?articleID= Freely available clone/distributions are under rapid development (e.g. Linux & FreeBSD)

3 Using Unix Shell: a program that acts as a middleman between you and the UNIX OS Terms similar to shell: Terminal / virtual terminal Console A shell allows users to Run programs Manage I/O of processes easily A Unix shell interprets a programming language (sometimes called the shell script)

A shell command ls -lp ~ ls: program name “ls” is the utility to list files -lp: options/switches, starting with a hyphen “l” means list in long format “p” means putting a slash after directory names ~: remaining parameters actual meaning depends on the program used for ls, the remaining parameters are the files or directories to be listed “~” means the home directory of the current user 4

Utilities Unix utilities are the basic programs supporting the user to control the system Examples: date: shows the system date man -s 1 ls: shows help on ls from the built-in manual section 1 pwd: prints the working directory echo: prints a message 5

6 Unix file system in brief A hierarchy of directories To locate a file in the system, a pathname is needed Command: pwd print your current working directory Pathnames Absolute pathnames Starting from the root (with a beginning “/”) Relative pathnames Starting from the current working directory

Managing Files on Unix (1) Creating an empty file touch Creating (making) a directory mkdir Moving (renaming) a file mv 7

Managing Files on Unix (2) Change working directory cd List files in a directory or fits the pattern ls View the content of a file cat more less head tail 8

Managing Files on Unix (3) Copying a file cp Remove a file rm Remove a non-empty directory rm –r Remove a whole directory without prompt rm –rf 9

10 Editing a file nano Adv: simple, easy to learn and use Dis: no GUI emacs Adv: has GUI, easy for beginners Dis: relatively slow vi/vim (vim stands for Vi Improved) Adv: fast for advance users Dis: text-version is quite difficult to learn GUI version: gvim, rgvim To learn, type “vitutor” in console Check their “man” page for detail usages

11 Compiling C programs in Unix Compiler: cc – the native C compiler under Unix gcc – C compiler under GNU project Usage is the same, gcc is more popular To compile a C source code file, say example.c, type in: cc example.c gcc example.c The output of both compilers (i.e. the executable) would be “a.out” by default To override the default executable name, use “-o” flag cc example.c –o example gcc example.c –o example You can name the executable as.exe or.bin file to remind yourself the nature of the file One more tip, use “-Wall” to get some warning messages Warning message usually indicate hidden bugs Try to understand the error messages and warning messages. For other flags, “man cc” or “man gcc”

12 Compiling C programs in Unix If there are so many compilation errors that it cannot fit into one screen. One way is to compile by the following command: cc example.c |& more It means that the compilation errors will be displayed screen by screen. That is, it will display the first screen of errors and wait. After the user examines the errors, he/she can choose to display the next screen of errors by hitting RETURN or quit by hitting Control-C. Then, the user can go back to modify the source code.