Computer Systems and Architecture

Similar documents
Computer Systems and Architecture

Perl and R Scripting for Biologists

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

Introduction to UNIX command-line

Introduction to Linux Organizing Files

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

Lab 2: Linux/Unix shell

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

Introduction to Linux

Unix Tools / Command Line

Chap2: Operating-System Structures

CENG 334 Computer Networks. Laboratory I Linux Tutorial

UNIX Quick Reference

Introduction to UNIX/Linux

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

UNIX. Basic UNIX Command

CS370 Operating Systems

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

Linux Command Line Primer. By: Scott Marshall

Introduction To Linux. Rob Thomas - ACRC

Files and Directories

Introduction to UNIX command-line II

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

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.

Useful Unix Commands Cheat Sheet

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

INSE Lab 1 Introduction to UNIX Fall 2017

Introduction to Linux

Introduction: What is Unix?

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

System Administration

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

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.

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

Command-line interpreters

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

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

Part 1: Basic Commands/U3li3es

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

Introduction to the UNIX command line

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.

BGGN 213 Working with UNIX Barry Grant

Working with Basic Linux. Daniel Balagué

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

Linux Essentials Objectives Topics:

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

Lecture 02: Linux Command Line

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]

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Introduction to UNIX Command Line

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

Introduction to Linux

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

Introduction to Linux

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Outline. Structure of a UNIX command

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.

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

Recap From Last Time:

Introduction to Unix: Fundamental Commands

CSE 390a Lecture 3. bash shell continued: processes; multi-user systems; remote login; editors

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

UNIX and Linux Essentials Student Guide

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

Introduction to Linux

The kernel is the low-level software that manages hardware, multitasks programs, etc.

Operating Systems. Copyleft 2005, Binnur Kurt

Introduction to Linux

IMPORTANT: Logging Off LOGGING IN

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

CS197U: A Hands on Introduction to Unix

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

The Unix Shell & Shell Scripts

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

The Unix Shell. Pipes and Filters

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

Chapter-3. Introduction to Unix: Fundamental Commands

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

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

CS4350 Unix Programming. Outline

CSc33200: Operating Systems, CS-CCNY, Fall 2003 Jinzhong Niu September 26, Nachos Overview

Introduction To. Barry Grant

Unix Essentials. BaRC Hot Topics Bioinformatics and Research Computing Whitehead Institute October 12 th

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

Research. We make it happen. Unix Basics. User Support Group help-line: personal:

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

A Short Introduction to UNIX Operating System

Linux Nuts and Bolts

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

Introduction to Linux

unix intro Documentation

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

Introduction to Linux

Chapter 1 - Introduction. September 8, 2016

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

A Brief Introduction to the Linux Shell for Data Science

List of Linux Commands in an IPm

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

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

Transcription:

Computer Systems and Architecture Introduction to UNIX Stephen Pauwels University of Antwerp October 2, 2015

Outline What is Unix? Getting started Streams Exercises

UNIX Operating system Servers, desktops, laptops Different types Sun Solaris FreeBSD GNU/Linux (Ubuntu, OpenSUSE, Debian, CentOS,...) MacOS X

UNIX Three parts: Kernel Central component, manages the computer s hardware (CPU, memory, filestore...) Shell Interface between user and kernel Command Line Interpreter (CLI) Programs

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

Files and processes Everything in UNIX is a file or a process A process is an executing program (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.html

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 privatefile Owner can read/write, others can t do anything chmod 664 file Owner and group can read/write, others can only read chmod +x file Add execute permissions for everyone

Basic UNIX commando s - browsing ls ls -a mkdir cd directory cd cd ~ cd.. pwd find list files and directories list all files and directories make a directory change to named 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 commando s - 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 from to uniq file file du file copy file1 and call it file2 move or rename file1 to file2 remove a file remove a directory 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 keywords 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 commando s - Varia man command date who whoami echo hello world! sort text finger display 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 its input Lookup user info

Archiving Tar: Uncompressed Create: tar -cvf tarball.tar files Extract: tar -xvf tarball.tar List files: tar -tf tarball.tgz Update files: tar -uf tarball.tgz 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 Ctrl+C: kill current job kill [-9] process id Kill job with pid process id pkill process name Kill job with name process name command & Run command in the background ps [-ef] Display process info top Display process info interactively jobs Display user s jobs fg pid Bring process to the foreground bg pid Bring process to the background

Basic UNIX commando s - Network ssh username @host scp from username @host :to wget http://url/file.jpg Login with a remote shell copy files over network download files from the web

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 : store ls output in listing.txt sort < listing.txt : feed listing.txt to sort program echo HOI >> listing.txt : append string HOI to listing.txt echo hello > /dev/null : suppress output who 2> errors.txt : 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 http://msdl.cs.mcgill.ca/people/hv/teaching/ ComputerSystemsArchitecture/#CS1