Introduction to Linux. Fundamentals of Computer Science

Similar documents
The Command Shell. Fundamentals of Computer Science

CS CS Tutorial 2 2 Winter 2018

User Guide Version 2.0

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

Essential Linux Shell Commands

Operating Systems. Copyleft 2005, Binnur Kurt

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

CS 261 Recitation 1 Compiling C on UNIX

EKT332 COMPUTER NETWORK

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

Introduction to Linux

Introduction to UNIX and Linux: Lecture 1

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Introduction to Cygwin Operating Environment

Introduction to the Linux Command Line

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny.

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

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

CISC 220 fall 2011, set 1: Linux basics

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Introduction to Linux Basics

Introduction to the UNIX command line

Introduction to Linux

Linux & Shell Programming 2014

Introduction to Linux

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

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

Practical Session 0 Introduction to Linux

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt

C++ Programming on Linux

Short Read Sequencing Analysis Workshop

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

Unit 10. Linux Operating System

Introduction to Unix - Lab Exercise 0

Introduction: What is Unix?

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

CSE 391 Lecture 1. introduction to Linux/Unix environment

Chapter-3. Introduction to Unix: Fundamental Commands

Parallel Programming Pre-Assignment. Setting up the Software Environment

New User Tutorial. OSU High Performance Computing Center

CHE3935. Lecture 1. Introduction to Linux

Operating systems fundamentals - B02

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

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

Introduction to Linux Environment. Yun-Wen Chen

Introduction to Linux

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

You should see something like this, called the prompt :

Lab Working with Linux Command Line

Perl and R Scripting for Biologists

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

CSE 391 Lecture 1. introduction to Linux/Unix environment

h/w m/c Kernel shell Application s/w user

Getting Started With UNIX Lab Exercises

Introduction to Unix and Linux. Workshop 1: Directories and Files

Lab 1 Introduction to UNIX and C

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018

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

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

Programming and Data Structure Laboratory (CS13002)

LAB #7 Linux Tutorial

Unix Shells and Other Basic Concepts

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Operating System Interaction via bash

CS370 Operating Systems

Chap2: Operating-System Structures

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

5/8/2012. Creating and Changing Directories Chapter 7

History. Terminology. Opening a Terminal. Introduction to the Unix command line GNOME

Intro to Linux & Command Line

Getting Started with UNIX

Physics REU Unix Tutorial

Using the Zoo Workstations

Scripting Languages Course 1. Diana Trandabăț

Session 1: Accessing MUGrid and Command Line Basics

Unix System Architecture, File System, and Shell Commands

commandname flags arguments

CSC116: Introduction to Computing - Java

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

Unix Introduction to UNIX

CSE 390a Lecture 1. introduction to Linux/Unix environment

The Command Line. Matthew Bender. September 10, CMSC Command Line Workshop. Matthew Bender (2015) The Command Line September 10, / 25

Linux hep.wisc.edu

5/20/2007. Touring Essential Programs

Linux Survival Guide

Linux Bootcamp Fall 2015

GNU/Linux Course Lesson 1. Puria Nafisi

COMS 6100 Class Notes 3

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

Programming Studio #1 ECE 190

Linux File System and Basic Commands

Intermediate Programming, Spring Misha Kazhdan

INTRODUCTION TO BIOINFORMATICS

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Transcription:

Introduction to Linux Fundamentals of Computer Science

Outline Operating Systems Linux History Linux Architecture Logging in to Linux Command Format Linux Filesystem Directory and File Commands Wildcard Characters Copying Files between Local/Remote Systems

Operating Systems Resource manager Allows users and applications to access system resources Safely! Controls process execution to efficiently utilize CPU Provides abstractions so applications need not worry about underlying details

Operating Systems Components Kernel Directly controls the underlying hardware System call library Provides services to programs for system calls e.g. write a file to disk, start program execution, communicate on the network, etc. Application programs System utilities Shell

History of Unix / Linux

Linux Architecture Kernel Device drivers Memory management File system support Supports most BSD and SYSV calls as well as POSIX Shells and GUIs sh the Bourne shell bash the Bourne again shell csh the c shell KDE and GNOME among others

Linux Architecture (continued) System utilities Commands to provide tools (which may be linked together) to access operating system services Daemons Services that lie dormant until an event occurs remote login printing services web page server etc. Application programs emacs editor xv image viewer gcc c ompiler g++ c++ compiler xfig, latex, soffice, etc.

Starting a Command Window in Linux: putty Use putty.exe cs.mtech.edu then go to the Students tab, select Software Download both putty and winscp Double click on putty Enter katie.mtech.edu for the Host Name (or you can use an IP) Click Open button you will see: login: Enter login name (first initial last name, all lowercase) then you will see password: If you already changed this, enter your new password. If you haven t, it is your student ID number Make sure you don t keep you ID as a password this is not secure Note, the password will not show up as you type it

Handy First Commands Change your password! passwd The system will prompt for old password and then ask you to type your new password twice None of this shows up on the screen Logging out exit OR logout OR <CTRL>d

Linux Command Format Most Linux commands are of the form: <command> <-options> <targets> <command> is the name of the command, e.g. ls <-options> are the options to the command, e.g. ls al <targets> may or may not be present, but may specify the target of the command, e.g. ls al /home

Linux Filesystem Filesystem stores all information that concerns the long-term state of the system OS kernel, executable files for system commands, configuration information, temporary workfiles, user data, special files, user files Types of files: Ordinary contain text, data or program information Directories folders that hold files or other folders/directories Devices block oriented (like disk drives) and character oriented (like keyboards) Links pointer to another file, can have hard links or soft links

Linux Filesystem Typical directory structure

Directory and File Commands Print (current) working directory: pwd List files in directory: ls ls a shows all files ls al shows all files in long format Change directory: cd <path> Make directory: mkdir <newname> Remove directory: rmdir <directory> Copy a file: cp <source> <destination> Move or rename a file: mv <source> <destination> Remove a file: rm <filename> Type a file to the screen: cat <filename> Type to screen one screen at a time: more OR less

Specifying Multiple Filename OR, Oh, this is where regular expressions come in!? matches any single character (like. in RegEx) * matches zero or more characters [<list of chars>] matches one character in the list

Escape Characters To use special characters, need to use special notation Try \ in front of special character Try using double quotes around special character(s) Try single quote in front of word Another type of special characters they say interpret or evaluate what is between them backquotes (below the ~ on your keyboard) e.g.

Copying a File to Another Computer: winscp Double click on winscp (you should have already downloaded it from the cs.mtech.edu website) Click the Run button Enter katie.mtech.edu for the host name Enter your user name in the User name box Enter your password in the Password box Hit Enter or click the Login button

Copying a File to Another Computer: winscp (continued) You will see two panes in a window The left side is your local computer The right side is the computer you just logged in to Can drag and drop files between the two sides Or you can drag files from and to File Manager on your local computer

Summary of Helpful Commands Action Windows Mac OS / Unix Move into a folder cd myfolder cd myfolder Move into parent folder cd.. cd.. Move into a folder, absolute folder cd \Users\keith List files in current folder dir ls Compile program in current folder javac Prog.java cd /Users/keith javac Prog.java Run a compiled program java Prog java Prog See what is in a text file type Prog.java more Prog.java Auto-complete filenames <tab key> <tab key> Previous command <up arrow> <up arrow> 18

Summary Operating Systems Linux History Linux Architecture Logging in to Linux Command Format Linux Filesystem Directory and File Commands Wildcard Characters Copying Files between Local/Remote Systems