Computer Systems and Architecture

Similar documents
Computer Systems and Architecture

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Introduction to UNIX command-line

Perl and R Scripting for Biologists

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

CS370 Operating Systems

Introduction to Linux

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Chap2: Operating-System Structures

Unix Tools / Command Line

Files and Directories

Introduction to Linux Organizing Files

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.

Introduction to UNIX command-line II

CSE 390a Lecture 2. Exploring Shell Commands, Streams, Redirection, and Processes

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

System Administration

Command-line interpreters

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Linux Command Line Primer. By: Scott Marshall

Useful Unix Commands Cheat Sheet

CS197U: A Hands on Introduction to Unix

Lab 2: Linux/Unix shell

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

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 Filesystem. January 26 th, 2004 Class Meeting 2

Introduction to Unix: Fundamental Commands

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Introduction to remote command line Linux. Research Computing Team University of Birmingham

CENG 334 Computer Networks. Laboratory I Linux Tutorial

UNIX Quick Reference

Chapter-3. Introduction to Unix: Fundamental Commands

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Introduction to Linux

Introduction to UNIX/Linux

Introduction: What is Unix?

Part 1: Basic Commands/U3li3es

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Outline. Structure of a UNIX command

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.

Introduction to the UNIX command line

Introduction to UNIX Command Line

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

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.

UNIX. Basic UNIX Command

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

UNIX and Linux Essentials Student Guide

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

INTRODUCTION TO LINUX

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

INSE Lab 1 Introduction to UNIX Fall 2017

ScazLab. Linux Scripting. Core Skills That Every Roboticist Must Have. Alex Litoiu Thursday, November 14, 13

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

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.

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

List of Linux Commands in an IPm

Introduction to Linux

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Essential Unix and Linux! Perl for Bioinformatics, ! F. Pineda

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Unix Introduction to UNIX

CS4350 Unix Programming. Outline

Introduction to the Linux Command Line

Session 1: Accessing MUGrid and Command Line Basics

CISC 220 fall 2011, set 1: Linux basics

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Introduction to Linux. Roman Cheplyaka

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Working with Basic Linux. Daniel Balagué

CS197U: A Hands on Introduction to Unix

Introduction to Linux

Lecture 02: Linux Command Line

Introduction to Linux

The Unix Shell & Shell Scripts

IMPORTANT: Logging Off LOGGING IN

CSCI 2132 Software Development. Lecture 4: Files and Directories

Introduction to Linux

Introduction To Linux. Rob Thomas - ACRC

Unix Workshop Aug 2014

Linux at the Command Line Don Johnson of BU IS&T

commandname flags arguments

Introduction to Linux

CSE 390a Lecture 2. Exploring Shell Commands, Streams, and Redirection

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

2) clear :- It clears the terminal screen. Syntax :- clear

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

Tutorial-1b: The Linux CLI

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Processes. Shell Commands. a Command Line Interface accepts typed (textual) inputs and provides textual outputs. Synonyms:

BGGN 213 Working with UNIX Barry Grant

Practical Session 0 Introduction to Linux

Transcription:

Computer Systems and Architecture Stephen Pauwels Computer Systems Academic Year 2018-2019

Overview of the Semester UNIX Introductie Regular Expressions Scripting Data Representation Integers, Fixed point, Floating point, IEEE- 754, ASCII, Unicode Assembler - MIPS Basics, Memory Stacks, Subroutines Advanced

Computer Systems and Architecture Stephen Pauwels Introduction to UNIX Academic Year 2018-2019

Outline What is UNIX? Getting started UNIX Shell Files and Processes Basic UNIX Commands Input/Output

UNIX Operating System (OS) Servers, desktops, laptops, tablets, smartphones Different types Sun Solaris FreeBSD GNU/Linux MacOS

UNIX Three parts Files and Processes Everything in UNIX is a file or a process (programs are processes) Shell Interface between user and kernel CommandLine Interpreter (CLI) Kernel Central component, manages the computer's hardware

UNIX Shell Interprets commands Commands are themselves programs Filename and command completion (use the [tab] key) History (use the cursor keys) Current working directory

Files and Processes Everything in UNIX is a file or a process A process is an executing program (with a unique PID) A file is a collection of data Directory structure Root: / Home dir: ~/ Current dir:./ Parent dir:../ Absolute path: /home/p10/p101234/oefeningen.html Relative path:./oefeningen.tml

Relative Vs Absolute Paths B / C a b D c d e

Relative Vs Absolute Paths Absolute Path: / B / C a b D c d e

Relative Vs Absolute Paths Absolute Path: /B/ B / C a b D c d e

Relative Vs Absolute Paths Absolute Path: /B/D B / C a b D c d e

Relative Vs Absolute Paths Absolute Path: /B/D/d B / C a b D c d e

Relative Vs Absolute Paths Relative Path:. / / CurrentWorking Directory: B C a b D c d e

Relative Vs Absolute Paths Relative Path:.. / / CurrentWorking Directory: B C a b D c d e

Relative Vs Absolute Paths Relative Path:.. /.. / / CurrentWorking Directory: B C a b D c d e

Relative Vs Absolute Paths Relative Path:.. /.. /C / CurrentWorking Directory: B C a b D c d e

Relative Vs Absolute Paths Relative Path:.. /.. /C/.. / CurrentWorking Directory: B C a b D c d e

Relative Vs Absolute Paths Relative Path:.. /.. /C/.. /a / CurrentWorking Directory: B C a b D c d e

Directory Structure / bin boot etc usr var sbin home Binaries Boot loader System config Shareable and read-only data Variable data files System binaries User home directories

File Permissions Users Unique username Member of one or more groups /etc/passwd and /etc/group Files Owner (and associated group) Set of permission flags: r (+4), w (+2), x (+1) for owner, group, other Change with chmod, chown, chgrp Examples: chmod 755 file Owner can do everything, group and others can read/execute chmod 777 file Everyone can read, write and execute chmod 600 file Owner can read/write, others can t do anything chmod +x file Add execute permission for everyone

Basic UNIX Commands - Browsing ls ls -a ls f* mkdir directory cd directory cd cd ~ cd.. pwd find list files and directories list all files and directories list all files starting with f (*: wildcard) make a directory named directory change to directory directory change to home directory change to home directory change to parent directory display the path of the current directory search through directory tree

Basic UNIX Commands - Files cp file1 file2 mv file1 file2 rm file rmdir directory cat file less file head file tail file grep keyword file wc file ln s to from uniq file file file du file copy file1 and call itfile2 move or rename file1 to file2 remove a file remove a directory (directory must be empty!) display a file display a file a page at a time display the first few lines of a file display the last few lines of a file search a file for keyword count number of metrics in file make softlink from to report or filter out repeated lines in a file show the file type of a file show the disk size of a file or directory

Basic UNIX Commands Varia man command data who whoami echo hello world! sort text finger display the manual pages for a command display date and time info on all currently logged on users info about yourself display characters in the terminal sort itsinput lookup user info

Archiving Tar: Uncompressed Create: tar -cvf tarball.tar files Extract: tar -xvf tarball.tar List files: tar -tf tarball.tar Upate files: tar -uf tarball.tar files Gzip: Compression Create: gzip tarball.tar Extract: gunzip tarball.tar.gz tar.gz or tgz? Tar + Compression Create: tar -cvzf tarball.tgz files Extract: tar -xvzf tarball.tgz List files: tar -tzf tarball.tgz

Processes Jobs are connected to terminal which started them Foreground or background kill current job: Ctrl+C kill [-9] process_id pkill process_name command & ps [-ef] top jobs fg pid bg pid Killjob with pid process_id Kill job with name process_name Run command in the background Display process info Display process info interactively Display users s jobs Bring processto the foreground Bring process to the background

Basic UNIX commands Network ssh username@host scp from username@host:to wget http://url/file.jpg ping host Login with a remote shell Copy files over network Download files from the web Send a small packet to a host (test reachability)

Standard in- and output Processes write to the standard output, and take their input from the standard input Keyboard and terminal Standard error (terminal) Redirection is possible >, >>, <, 2>

Redirection ls alrf > listing.txt sort < listing.txt echo HOI >> listing.txt echo hello > /dev/null who 2> errors.txt store ls output in listing.txt feed listing.txtto sort program append string HOI to listing.txt suppress output store errors in file

Pipes Pipes redirect output from one process to the following one Without pipes: who > names.txt sort < names.txt With pipes: who sort

Exercises Blackboard Course webpage http://msdl.cs.mcgill.ca/people/hv/teaching/computersystemsarchitecture/#cs1