Getting started with Hugs on Linux
|
|
- Jennifer Daniels
- 5 years ago
- Views:
Transcription
1 Getting started with Hugs on Linux COM1022 Functional Programming Techniques Dr Hans Georg Schaathun University of Surrey Autumn 2009 Week 7 Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 1 / 35
2 Outline 1 Learning Objectives 2 File tree and command line 3 Software 4 The editor 5 Haskell Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 2 / 35
3 Outline Learning Objectives 1 Learning Objectives 2 File tree and command line 3 Software 4 The editor 5 Haskell Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 3 / 35
4 Learning Objectives Learning Objectives From the module description At the end of the module, the students will be able to work with standard command-line interfaces. write programs employing the fundamental features of Haskell. be able to reason over computer programs. be able to make and use reusable functions as a fundamental building block of software development. understand recursion and polymorphism and be able to use them in simple algorithm design. contrast functional and imperative languages and understand the advantages and disadvantages of each. Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 4 / 35
5 Learning Objectives The Programme Weekly lectures and labs 3 1h lecture + 1h lab 2 3h lectures + 1h lab 10 2h lectures + 1-2h lab Weekly exercise sheets for the labs Lab Sheet 1 for next week (preparatory exercises). Some lab exercises will have direct relevance for the coursework Coursework 5% on reasoning (theoretical) 40% programming exercise Details will be announced later. 2h written, unseen exam See current/comm1022/ Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 5 / 35
6 This week Learning Objectives This week will give you the basic introduction to the labs and software linux command line the editor the hugs interpreter The lecture is worth little take advantage of the lab sessions make sure that you can use the knowledge from the lecture Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 6 / 35
7 Learning Objectives References A comprehensive book (recommended): Haskell: The Craft of Functional Programming by Simon Thompson A basic book: Programming in Haskell by Graham Hutton You can download a copy of hugs Reference on Unix/Linux (e.g. Unix in a Nutshell [O Reilly]) Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 7 / 35
8 Outline File tree and command line 1 Learning Objectives 2 File tree and command line 3 Software 4 The editor 5 Haskell Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 8 / 35
9 File tree and command line The command line (shell) Open a terminal window Applications System Terminal... emulates an old-fashioned text terminal (tty) An interpreter (or shell) runs in the terminal reads and interprets commands Different interpreters are available: bash, tcsh, ksh, zsh Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 9 / 35
10 File tree and command line The file tree research/ teaching/ Notes/ labs/ Mail/ bin/ Papers/ work/ Mail/ cs190/ cs168/ css1hs/ cscssst/ css1ht/ eps351/ epsguest/ bin/ lib/ filer2/ filer6/ bin/ man/ local/ home/ tmp/ usr/ / Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 10 / 35
11 File tree and command line Navigating in the tree The files are organised in a tree Each node is either a directory, containing files and/or other directories a file, containing data for some piece of software Current Working Directory your location in the tree Useful commands: pwd : print current directory cd : change directory ls : list directory contents Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 11 / 35
12 Naming a node File tree and command line A file/directory is identified by its path Name each directory traversed to reach the file separated by slashes (/) A relative path starts from the current directory e.g. cs190/test.hs.. identifies the parent directory Absolute paths starts at the root (/) /home/filer6/epsguest/eps351/cs190/test.hs Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 12 / 35
13 File tree and command line Path: /home/filer6/epsguest/eps351/cs190/ research/ teaching/ Notes/ labs/ Mail/ bin/ Papers/ work/ Mail/ cs190/ cs168/ css1hs/ cscssst/ css1ht/ eps351/ epsguest/ bin/ lib/ filer2/ filer6/ bin/ man/ local/ home/ tmp/ usr/ / Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 13 / 35
14 File tree and command line Modifying the tree mkdir : make new directory rmdir : remove (empty) directory rm : remove file cp : copy file mv : move file For more information you can use the man pages man cp man man It takes some time to learn to read the man pages though Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 14 / 35
15 File information File tree and command line % ls -l total 12 drwxr-sr-x 2 eps351 epsguest 4096 Aug 6 13:25 labs/ drwxr-sr-x 2 eps351 epsguest 4096 Aug 6 13:25 Notes/ -rw eps351 epsguest 0 Aug 6 13:26 test2.h -rw-r--r-- 1 eps351 epsguest 8 Aug 6 13:25 test.hs File type: d for directory, - for regular file Nine characters for mode (access permissions) Number of links to the file File owner (eps351) and group (epsguest) File size (bytes) Time of last modification Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 15 / 35
16 File tree and command line File mode (access permissions) drwxr-sr-x 2 eps351 epsguest 4096 Aug 6 13:25 Notes/ Three user classes: user/owner (char 2-4) group (char 5-7) others (char 8-10) Three access rights: r for read w for write x (or s) for execute (programs) or open (directories) chmod : change mode chmod g+w test.hs gives (+) the group (g) the write access (w) u/g/o/a [+/-/=] [r/w/x] Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 16 / 35
17 Outline Software 1 Learning Objectives 2 File tree and command line 3 Software 4 The editor 5 Haskell Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 17 / 35
18 Running other software Software Any program can be launched from the command line Some create their own window: firefox & emacs & Some run in the terminal and shell: man man vim myfile.hs find. -name myexercise.hs -print Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 18 / 35
19 Software Background and Foreground What does the ampersand mean? Starting a program in the foreground: emacs Starting a program in the background: emacs & Only have one foreground process and then, it cannot do anything else When a program runs in the background, the shell continues doing other things (i.e. new prompt) Programs running in the terminal window needs the foreground Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 19 / 35
20 Software Background and Foreground What does the ampersand mean? Starting a program in the foreground: emacs Starting a program in the background: emacs & Only have one foreground process and then, it cannot do anything else When a program runs in the background, the shell continues doing other things (i.e. new prompt) Programs running in the terminal window needs the foreground Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 19 / 35
21 Software Background and Foreground What does the ampersand mean? Starting a program in the foreground: emacs Starting a program in the background: emacs & Only have one foreground process and then, it cannot do anything else When a program runs in the background, the shell continues doing other things (i.e. new prompt) Programs running in the terminal window needs the foreground Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 19 / 35
22 Software Moving to the background Special keys in the terminal only Interrupt: Ctrl-C (terminates the program) Suspend: Ctrl-Z (program stops, but can rewake) Rewaking a process: Background: bg Foreground: fg List jobs: jobs bg %jobno. If you forget the ampersand: Ctrl-Z + bg If you suspend a terminal program: fg Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 20 / 35
23 Software Processes and kill List processes: Current terminal: ps All: ps xg Note PID (process ID) to the left Kill a process: Terminate: kill PID or kill %jobno. Kill: kill -KILL (and PID or job no.) Dynamic process list: top shows resource expenditure If a process malfunctions, you can kill it. Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 21 / 35
24 Outline The editor 1 Learning Objectives 2 File tree and command line 3 Software 4 The editor 5 Haskell Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 22 / 35
25 The editor The editor The editor is our most important tool Edit plain text files in Haskell, Java, C, English, HTML no special formatting (i.e. not a word-processor) Use your favourite editor emacs, vim (the heavy-weighters) nedit, gedit (simple GUI) pico (simple in the terminal window) etc. Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 23 / 35
26 The editor emacs Straight forward for most users Uni-modal editor Runs in a separate window (with menus etc.) It is a powerful tool Advanced editing Macros Plugins for , news, etc Advanced features are hard to learn and few use them Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 24 / 35
27 The editor vim Bimodal editor Alien for many users Many commands at few key strokes Command mode all keys are used for commands (movement, replace, etc) Insert mode Typed text is added to the file Runs on the command line: very fast Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 25 / 35
28 The editor Basics in vim/vi Start it: vim filename.hs Command mode Insert mode: i, I, a, A, o, O Insert mode Command mode: Esc Colon commands are followed by return: Quit: :q (:q! forced) Save and quit: :wq Search and replace: :%s/old/new/g Delete: x, X (character), dd (line) Replace: r (character), R (several character (insert mode)) See a full tutorial on the web page. Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 26 / 35
29 The editor Starting the editor on a file A file can be given on the command line vi myfile.hs starts vi on the given file Editors running in the terminal (vi, pico) are almost always started this way You can also run emacs myfile.hs but many prefer loading the files from the menus because emacs is heavy, subsequent files should be loaded from the menu quitting and restarting is impractical vi users often prefer quit and restart Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 27 / 35
30 Outline Haskell 1 Learning Objectives 2 File tree and command line 3 Software 4 The editor 5 Haskell Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 28 / 35
31 Haskell The interpreter Start hugs on the command line different prompt Reads and interprets commands and expressions :load module.hs 56+3*9-7 "Hello World!" "Hello" ++ ", " ++ "George" You can use it straight away as a calculator... but you d rather want to make your own module with advanced features Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 29 / 35
32 Expressions Haskell An expression can be A single number: 42 or 12.4 An operator with arguments: or 54.2/3 A function call: sqrt 12 ( 12) When you type an expresion, it is evaluated, i.e. functions and operators are applied to produce a result the result is displayed if possible Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 30 / 35
33 Haskell Scripts Defining functions and constants Haskell Haskell scripts: e.g. demo.hs Edit scripts using an editor (vim, emacs) Load the script in hugs using :load The script contains definitions not expressions Note that you cannot make definitions on the command line only expressions Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 31 / 35
34 Haskell Scripts Defining functions and constants Haskell Haskell scripts: e.g. demo.hs Edit scripts using an editor (vim, emacs) Load the script in hugs using :load The script contains definitions not expressions Note that you cannot make definitions on the command line only expressions Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 31 / 35
35 Haskell Definitions and declarations Declaration: myname :: String Definition: myname = "George" This is not similar to Java = denotes equality it is a universal truth in Java = denotes an assignment and myname could then be reassigned a definition is done once and for all Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 32 / 35
36 Haskell Definitions and declarations Declaration: myname :: String Definition: myname = "George" This is not similar to Java = denotes equality it is a universal truth in Java = denotes an assignment and myname could then be reassigned a definition is done once and for all Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 32 / 35
37 Haskell Naming requirements Haskell is case sensitive Haskell is case sensitive mylist and mylist are different variables Case gives information about the identifier all variables start with lower-case : mylist all type identifiers start with upper-case : Int If you forget this, you will get confusing error messages... Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 33 / 35
38 Comments Haskell Good practice: comment your code Comment starts with - and ends at the end of line - the compiler ignore comments like this Comments are for human readers explain your code make it easy to understand Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 34 / 35
39 Summary Haskell Quick overview of basic features and tools needed You will have to test it all on the computer lab sessions and in your own time This week s material is basic you have to master it Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn 2009Week 7 35 / 35
Getting started with Hugs on Linux
Getting started with Hugs on Linux CS190 Functional Programming Techniques Dr Hans Georg Schaathun University of Surrey Autumn 2008 Week 1 Dr Hans Georg Schaathun Getting started with Hugs on Linux Autumn
More informationMills HPC Tutorial Series. Linux Basics I
Mills HPC Tutorial Series Linux Basics I Objectives Command Line Window Anatomy Command Structure Command Examples Help Files and Directories Permissions Wildcards and Home (~) Redirection and Pipe Create
More informationCS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX
CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the EECS labs that dual boot
More informationCS Fundamentals of Programming II Fall Very Basic UNIX
CS 215 - Fundamentals of Programming II Fall 2012 - Very Basic UNIX This handout very briefly describes how to use Unix and how to use the Linux server and client machines in the CS (Project) Lab (KC-265)
More informationA Brief Introduction to Unix
A Brief Introduction to Unix Sean Barag Drexel University March 30, 2011 Sean Barag (Drexel University) CS 265 - A Brief Introduction to Unix March 30, 2011 1 / 17 Outline 1 Directories
More informationCISC 220 fall 2011, set 1: Linux basics
CISC 220: System-Level Programming instructor: Margaret Lamb e-mail: malamb@cs.queensu.ca office: Goodwin 554 office phone: 533-6059 (internal extension 36059) office hours: Tues/Wed/Thurs 2-3 (this week
More informationUnix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University
Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )
More informationPerl and R Scripting for Biologists
Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications
More informationCSCI 2132 Software Development. Lecture 4: Files and Directories
CSCI 2132 Software Development Lecture 4: Files and Directories Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 12-Sep-2018 (4) CSCI 2132 1 Previous Lecture Some hardware concepts
More informationIntroduction to Linux
Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,
More informationIntroduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University
Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an
More informationSystems Programming and Computer Architecture ( ) Exercise Session 01 Data Lab
Systems Programming and Computer Architecture (252-0061-00) Exercise Session 01 Data Lab 1 Goal Get familiar with bit level representations, C and Linux Thursday, September 22, 2016 Systems Programming
More informationGetting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers
Chapter 2 Unix Utilities for non-programmers Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003. Original Notes by Raj Sunderraman Converted to presentation
More informationUnix Basics. Systems Programming Concepts
Concepts Unix directories Important Unix file commands man, pwd, ls, mkdir, cd, cp, mv File and directory access rights through permission settings Using chmod to change permissions Other important Unix
More informationacmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;
Note: you can find this file under: http://www.cs.queensu.ca/ acmteam/unix.pdf Introduction to Unix Tutorial In this tutorial, you will learn: How to manage your account (user ID, password, shell); Navigating
More informationLezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi
Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza Sommario Shell command language Introduction A
More informationINSE Lab 1 Introduction to UNIX Fall 2017
INSE 6130 - Lab 1 Introduction to UNIX Fall 2017 Updated by: Paria Shirani Overview In this lab session, students will learn the basics of UNIX /Linux commands. They will be able to perform the basic operations:
More informationLinux Systems Administration Getting Started with Linux
Linux Systems Administration Getting Started with Linux Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International
More informationIntroduction: What is Unix?
Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix
More informationLezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell
Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Esercitazione Introduzione al linguaggio di shell Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza
More informationWorking with Basic Linux. Daniel Balagué
Working with Basic Linux Daniel Balagué How Linux Works? Everything in Linux is either a file or a process. A process is an executing program identified with a PID number. It runs in short or long duration
More informationLinux/Cygwin Practice Computer Architecture
Linux/Cygwin Practice 2010 Computer Architecture Linux Login Use ssh client applications to connect (Port : 22) SSH Clients zterm ( http://www.brainz.co.kr/products/products4_2.php ) Putty ( http://kldp.net/frs/download.php/3411/hangulputty-0.58.h2.exe
More informationIntroduction to Linux
Introduction to Linux The command-line interface A command-line interface (CLI) is a type of interface, that is, a way to interact with a computer. Window systems, punched cards or a bunch of dials, buttons
More informationEECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou
EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction
More informationRead the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.
Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If
More informationTHE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering
THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering ENG224 Information Technology Part I: Computers and the Internet Laboratory 2 Linux Shell Commands and vi Editor
More informationCSC209H Lecture 1. Dan Zingaro. January 7, 2015
CSC209H Lecture 1 Dan Zingaro January 7, 2015 Welcome! Welcome to CSC209 Comments or questions during class? Let me know! Topics: shell and Unix, pipes and filters, C programming, processes, system calls,
More informationLinux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.
File system access rights Linux Tutorial #6 Linux provides file system security using a three- level system of access rights. These special codes control who can read/write/execute every file and directory
More informationChapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories
Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the
More informationUNIX Tutorial Five
UNIX Tutorial Five 5.1 File system security (access rights) In your unixstuff directory, type % ls -l (l for long listing!) You will see that you now get lots of details about the contents of your directory,
More informationSession 1: Accessing MUGrid and Command Line Basics
Session 1: Accessing MUGrid and Command Line Basics Craig A. Struble, Ph.D. July 14, 2010 1 Introduction The Marquette University Grid (MUGrid) is a collection of dedicated and opportunistic resources
More informationcommandname flags arguments
Unix Review, additional Unix commands CS101, Mock Introduction This handout/lecture reviews some basic UNIX commands that you should know how to use. A more detailed description of this and other commands
More informationIntroduction to Linux
Introduction to Linux January 2011 Don Bahls User Consultant (Group Leader) bahls@arsc.edu (907) 450-8674 Overview The shell Common Commands File System Organization Permissions Environment Variables I/O
More informationFile system Security (Access Rights)
File system Security (Access Rights) In your home directory, type % ls -l (l for long listing!) You will see that you now get lots of details about the contents of your directory, similar to the example
More informationCrash Course in Unix. For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix. -or- Unix in a Nutshell (an O Reilly book).
Crash Course in Unix For more info check out the Unix man pages -orhttp://www.cs.rpi.edu/~hollingd/unix -or- Unix in a Nutshell (an O Reilly book). 1 Unix Accounts To access a Unix system you need to have
More informationLab 3a Using the vi editor
Lab 3a Using the vi editor Objectives: Become familiar with the vi Editor Review the three vi Modes Review keystrokes to move between vi modes Create a new file with vi Editor Invoke vi with show mode
More informationIntroduction to Linux
Introduction to Linux Phil Mercurio The Scripps Research Institute mercurio@scripps.edu 1 Session Overview What is Linux Shells & Windows The Linux File System Assorted Commands 2 What Is Linux? Linux
More informationChapter-3. Introduction to Unix: Fundamental Commands
Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system
More informationLinux File System and Basic Commands
Linux File System and Basic Commands 0.1 Files, directories, and pwd The GNU/Linux operating system is much different from your typical Microsoft Windows PC, and probably looks different from Apple OS
More information15-122: Principles of Imperative Computation
15-122: Principles of Imperative Computation Lab 0 Navigating your account in Linux Tom Cortina, Rob Simmons Unlike typical graphical interfaces for operating systems, here you are entering commands directly
More informationOutline. Structure of a UNIX command
Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory
More informationCommands are in black
Starting From the Shell Prompt (Terminal) Commands are in black / +--------+---------+-------+---------+---------+------ +------ +------ +------ +------ +------ +-- Bin boot dev etc home media sbin bin
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationCS4350 Unix Programming. Outline
Outline Unix Management Files and file systems Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission
More informationFirst of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.
Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If
More informationCENG 334 Computer Networks. Laboratory I Linux Tutorial
CENG 334 Computer Networks Laboratory I Linux Tutorial Contents 1. Logging In and Starting Session 2. Using Commands 1. Basic Commands 2. Working With Files and Directories 3. Permission Bits 3. Introduction
More informationIntroduction to the basics of UNIX
Introduction to the basics of UNIX Joachim Hein Centre for Mathematical Sciences Lund University Outline 1 Operating system UNIX 2 Interacting with UNIX Manipulating files and directories Editing files:
More informationHitchhiker s Guide to VLSI Design with Cadence & Synopsys
Hitchhiker s Guide to VLSI Design with Cadence & Synopsys David Money Harris 17 January 2009 The VLSI design tools at Harvey Mudd College are hosted on a Linux server named chips. This document introduces
More informationFiles and Directories
CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on
More informationIntroduction to Linux Workshop 1
Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate
More informationLab 2: Linux/Unix shell
Lab 2: Linux/Unix shell Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 2 3 4 5 6 7 What is a shell? What is a shell? login is a program that logs users in to a computer. When
More informationIntroduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines
Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical
More informationCSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts
CSCI 2132 Software Development Lecture 3: Unix Shells and Other Basic Concepts Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 10-Sep-2018 (3) CSCI 2132 1 Introduction to UNIX
More informationINTRODUCTION TO LINUX
INTRODUCTION TO LINUX REALLY SHORT HISTORY Before GNU/Linux there were DOS, MAC and UNIX. All systems were proprietary. The GNU project started in the early 80s by Richard Stallman Goal to make a free
More informationCSE 391 Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/391/
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Sanghoon Han(sanghoon.han@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) Please come
More informationGetting Started with UNIX
Getting Started with UNIX What is UNIX? Boston University Information Services & Technology Course Number: 4000 Course Instructor: Kenny Burns Operating System Interface between a user and the computer
More informationUnix File System. Learning command-line navigation of the file system is essential for efficient system usage
ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find
More informationIntroduction of Linux
Introduction of Linux 阳 oslab2018_class1@163.com 寅 oslab2018_class2@163.com PART I Brief Introduction Basic Conceptions & Environment Install & Configure a Virtual Machine Basic Commands PART II Shell
More informationUnix Handouts. Shantanu N Kulkarni
Unix Handouts Shantanu N Kulkarni Abstract These handouts are meant to be used as a study aid during my class. They are neither complete nor sincerely accurate. The idea is that the participants should
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationVirtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you. https://www.virtualbox.org/
Virtual Machine Anyone have problems installing it? VM: Virtual Box - allows you to run a different operating system within the current operating system of your machine. https://www.virtualbox.org/ Linux
More informationLinux Shell Script. J. K. Mandal
Linux Shell Script J. K. Mandal Professor, Department of Computer Science & Engineering, Faculty of Engineering, Technology & Management University of Kalyani Kalyani, Nadia, West Bengal E-mail: jkmandal@klyuniv.ac.in,
More informationCHE3935. Lecture 1. Introduction to Linux
CHE3935 Lecture 1 Introduction to Linux 1 Logging In PuTTY is a free telnet/ssh client that can be run without installing it within Windows. It will only give you a terminal interface, but used with a
More informationIntroduction to Unix. University of Massachusetts Medical School. October, 2014
.. Introduction to Unix University of Massachusetts Medical School October, 2014 . DISCLAIMER For the sake of clarity, the concepts mentioned in these slides have been simplified significantly. Most of
More informationCS4023 Week04 Lab Exercise
CS4023 Week04 Lab Exercise Lab Objective: We will use this lab to log in to our Linux accounts and to look at some simple programs that perform a few elementary system calls. By the end of the lab we will
More informationUNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29
UNIX The Very 10 Short Howto for beginners Soon-Hyung Yook March 27, 2015 Soon-Hyung Yook UNIX March 27, 2015 1 / 29 Table of Contents 1 History of Unix 2 What is UNIX? 3 What is Linux? 4 How does Unix
More informationUnix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech
Unix File System Class Meeting 2 * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech Unix File System The file system is your interface to: physical
More information5/20/2007. Touring Essential Programs
Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.
More informationLinux at the Command Line Don Johnson of BU IS&T
Linux at the Command Line Don Johnson of BU IS&T We ll start with a sign in sheet. We ll end with a class evaluation. We ll cover as much as we can in the time allowed; if we don t cover everything, you
More informationLinux Command Line Interface. December 27, 2017
Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors
More informationIntroduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.
Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview
More informationCSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/
More information*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG
*nix Crash Course Presented by: Virginia Tech Linux / Unix Users Group VTLUUG Ubuntu LiveCD No information on your hard-drive will be modified. Gives you a working Linux system without having to install
More informationLinux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2
Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working
More informationWeek Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages
ULI101 Week 02 Week Overview Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages Text editing Common file utilities: cat,more,less,touch,file,find
More informationIntroduction to the Linux Command Line
Introduction to the Linux Command Line May, 2015 How to Connect (securely) ssh sftp scp Basic Unix or Linux Commands Files & directories Environment variables Not necessarily in this order.? Getting Connected
More informationAMS 200: Working on Linux/Unix Machines
AMS 200, Oct 20, 2014 AMS 200: Working on Linux/Unix Machines Profs. Nic Brummell (brummell@soe.ucsc.edu) & Dongwook Lee (dlee79@ucsc.edu) Department of Applied Mathematics and Statistics University of
More informationCSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209
CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System
More informationCpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C
CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C Welcome! Welcome to your CpSc 111 lab! For each lab this semester, you will be provided a document like this to guide you. This material, as
More informationGetting your department account
02/11/2013 11:35 AM Getting your department account The instructions are at Creating a CS account 02/11/2013 11:36 AM Getting help Vijay Adusumalli will be in the CS majors lab in the basement of the Love
More informationIntroduction to Cygwin Operating Environment
Introduction to Cygwin Operating Environment ICT 106 Fundamentals of Computer Systems Eric Li ICT106_Pract_week 1 1 What s Cygwin? Emulates Unix/Linux environment on a Windows Operating System; A collection
More informationOxford University Computing Services. Getting Started with Unix
Oxford University Computing Services Getting Started with Unix Unix c3.1/2 Typographical Conventions Listed below are the typographical conventions used in this guide. Names of keys on the keyboard are
More informationIntroduction to Unix: Fundamental Commands
Introduction to Unix: Fundamental Commands Ricky Patterson UVA Library Based on slides from Turgut Yilmaz Istanbul Teknik University 1 What We Will Learn The fundamental commands of the Unix operating
More informationThe Unix Shell & Shell Scripts
The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises
More informationUsing echo command in shell script
Lab 4a Shell Script Lab 2 Using echo command in shell script Objective Upon completion of this lab, the student will be able to use echo command in the shell script. Scenario The student is the administrator
More informationOperating Systems. Copyleft 2005, Binnur Kurt
3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.
More informationUNIX Quick Reference
UNIX Quick Reference Charles Duan FAS Computer Services August 26, 2002 1 Command Reference Many of these commands have many more options than the ones displayed here. Most also take the option h or help,
More informationCS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.)
1 Introduction 1 CS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.) This laboratory is intended to give you some brief experience using the editing/compiling/file
More informationOperating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing
Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out
More information1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words
More Linux Commands 1 wc The Linux command for acquiring size statistics on a file is wc. This command provides the line count, word count and number of bytes in a file. Open up a terminal, make sure you
More informationCMPUT 201: Practical Programming Methodology. Guohui Lin Department of Computing Science University of Alberta September 2018
CMPUT 201: Practical Programming Methodology Guohui Lin guohui@ualberta.ca Department of Computing Science University of Alberta September 2018 Lecture 1: Course Outline Agenda: Course calendar description
More informationIntroduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen
Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent
More informationIntroduction to remote command line Linux. Research Computing Team University of Birmingham
Introduction to remote command line Linux Research Computing Team University of Birmingham Linux/UNIX/BSD/OSX/what? v All different v UNIX is the oldest, mostly now commercial only in large environments
More informationM2PGER FORTRAN programming. General introduction. Virginie DURAND and Jean VIRIEUX 10/13/2013 M2PGER - ALGORITHME SCIENTIFIQUE
M2PGER 2013-2014 FORTRAN programming General introduction Virginie DURAND and Jean VIRIEUX 1 Why learning programming??? 2 Why learning programming??? ACQUISITION numerical Recording on magnetic supports
More informationEECS 2031E. Software Tools Prof. Mokhtar Aboelaze
EECS 2031 Software Tools Prof. Mokhtar Aboelaze Footer Text 1 EECS 2031E Instructor: Mokhtar Aboelaze Room 2026 CSEB lastname@cse.yorku.ca x40607 Office hours TTH 12:00-3:00 or by appointment 1 Grading
More informationYou will automatically be in your user (home) directory when you login.
Directory structure / (root) bin dev etc lib users users2 tmp These directories typically contain system libraries, executable binary files, device handlers and drivers, etc. The user home directories
More informationLecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.
Lecture 3 Unix Question? Denmark is famous for? a. LEGO. b. The world s best restaurant. c. Being in the top three happiest countries in the world. d. Having the highest taxes in Europe (57%). e. All of
More informationPractical Session 0 Introduction to Linux
School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student
More informationAN INTRODUCTION TO UNIX
AN INTRODUCTION TO UNIX Paul Johnson School of Mathematics September 18, 2011 OUTLINE 1 INTRODUTION Unix Common Tasks 2 THE UNIX FILESYSTEM Moving around Copying, deleting File Permissions 3 SUMMARY OUTLINE
More information