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

Similar documents
CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Introduction to Linux Spring 2014, Section 02, Lecture 3 Jason Tang

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

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

The Directory Structure

Physics REU Unix Tutorial

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

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

Lab Working with Linux Command Line

Session 1: Accessing MUGrid and Command Line Basics

Introduction to Linux. Fundamentals of Computer Science

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction to the Linux Command Line

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

1 Getting Started with Linux.

Mills HPC Tutorial Series. Linux Basics I

CSCI 2132 Software Development. Lecture 4: Files and Directories

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

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

User Guide Version 2.0

Parts of this tutorial has been adapted from M. Stonebank s UNIX Tutorial for Beginners (

UNIX Tutorial One

Linux Command Line Primer. By: Scott Marshall

Unix Tutorial Haverford Astronomy 2014/2015

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.

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.

Unit 10. Linux Operating System

CISC 220 fall 2011, set 1: Linux basics

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.

COSC UNIX. Textbook. Grading Scheme

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

Operating System Interaction via bash

INSE Lab 1 Introduction to UNIX Fall 2017

Scripting Languages Course 1. Diana Trandabăț

Linux/Cygwin Practice Computer Architecture

CENG 334 Computer Networks. Laboratory I Linux Tutorial

commandname flags arguments

Introduction of Linux

Introduction to the UNIX command line

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

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

Introduction to Linux

Essential Linux Shell Commands

Unix Basics. Systems Programming Concepts

Chapter-3. Introduction to Unix: Fundamental Commands

Python for Astronomers. Week 1- Basic Python

You should see something like this, called the prompt :

Introduction to Linux

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

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

DATA 301 Introduction to Data Analytics Command Line. Dr. Ramon Lawrence University of British Columbia Okanagan

Why learn the Command Line? The command line is the text interface to the computer. DATA 301 Introduction to Data Analytics Command Line

Using the Zoo Workstations

UNIX File Hierarchy: Structure and Commands

CS1101: Lecture 5 Basic File Manipulation II

Oxford University Computing Services. Getting Started with Unix

Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide

Introduction to Unix: Fundamental Commands

CMSC 201 Spring 2018 Lab 01 Hello World

The Command Shell. Fundamentals of Computer Science

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

Introduction to UNIX command-line

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen

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

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

Unix File System. Learning command-line navigation of the file system is essential for efficient system usage

Practical Session 0 Introduction to Linux

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

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

CS 300. Data Structures

Overview of the UNIX File System

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.

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

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Introduction to Linux

Operating systems fundamentals - B02

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

Introduction to Linux

Part I. Introduction to Linux

Unix Filesystem. January 26 th, 2004 Class Meeting 2

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

Std: XI CHAPTER-3 LINUX

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

Unit 13. Linux Operating System Debugging Programs

Linux File System and Basic Commands

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

Getting Started with UNIX

CMSC 201 Spring 2017 Lab 01 Hello World

Helsinki 19 Jan Practical course in genome bioinformatics DAY 0

5/20/2007. Touring Essential Programs

Operating Systems. Copyleft 2005, Binnur Kurt

Introduction To Linux. Rob Thomas - ACRC

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

Linux hep.wisc.edu

Commands are in black

Week Overview. Unix file system File types and file naming Basic file system commands: pwd,cd,ls,mkdir,rmdir,mv,cp,rm man pages

Chapter 6 Using a Redundant Management Module

Introduction to Unix - Lab Exercise 0

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 and Supercomputers

Transcription:

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

What is an Operating System? A computer program that: Controls how the CPU, memory and I/O devices work together to execute programs Performs many operations, such as: Allows you to communicate with the computer (tell it what to do) Controls access (login) to the computer Keeps track of all processes currently running Often referred to as simply OS 2

How Do I Communicate With the Computer Using the OS? You communicate using the particular OS s user interface. Graphical User Interface (GUI) Windows, Linux Command-driven interface - DOS, UNIX, Linux We will be using the Linux operating system, which is very similar to UNIX. Notice that it is listed as both GUI and Command-driven. 3

GUI vs. Command-driven We will be using both the GUI version of Linux and the Command-driven Interface. When you connect to GL through TeraTerm, you are using only the Command-driven Interface. When you reboot the computer into Linux, you will use both the GUI and the Commanddriven Interface. 4

Example of Command-driven Screenshot of connection to linux3.gl.umbc.edu 5

Example of GUI Screenshot of Fedora 7 6

Another Example of GUI Screenshot of Red Hat Enterprise Linux (RHEL) 5 7

How Do I Communicate With the Computer Using the OS? (con t) When you log in to the Linux system here, a user prompt will be displayed: linux#[1]% _ where # is the number of the Linux server to which you have connected. You may use any of the Linux servers: linux1, linux2 or linux3. The number in the brackets will change as you work. It is the number of the command that you are about to type. If this prompt is not on the screen at any time, you are not communicating with the OS. 8

Linux Overview Files and Filenames Directories and Subdirectories Frequently Used Commands 9

Files A file is a sequence of bytes. It can be created by a text editor (XEmacs or Notepad) a computer program (such as a C program) It may contain a program, data, a document, or other information. Files that contain other files are called directories (sometimes called folders). 10

Linux Filenames Restrictions Typically do not have spaces or other reserved characters Have a maximum length (typically 255 characters but who wants to type that much!) Are case sensitive For this class, you should stick with filenames that contain only letters (uppercase or lowercase), numbers, and the underscore ( _ ) or hypen (-). No spaces! Some examples: firefox.exe, things2do.txt, dinner_menu.pdf 11

Directories Directories contain files or other directories called subdirectories. They may also be empty. Directories are organized in a hierarchical fashion. They help us to keep our files organized. 12

Example Directory Tree /afs/umbc.edu/users/j/d/jdoe28/home/ Mail/ recipes/ courses/ pies/ cookies/ CMSC104/ apple.txt peach.txt choc_chip.txt 13

Subdirectories Are used for organizing your files For example, make a subdirectory for CMSC104 make subdirectories for each project CMSC104/ hw1/ hw3/... proj4/ 14

More Directories Your home directory is where you are located when you log in (e.g., /afs/umbc.edu/users/j/d/jdoe28/home/). The current directory is where you are located at any time while you are using the system. The / (pronounced slash ) is the root directory in Linux. Files within the same directory must be given unique names. Paths allow us to give the same name to different files located in different directories. Each running program has a current directory and all filenames are implicitly assumed to start with the name of that directory unless they begin with a slash. 15

Moving in the Directory Tree. (dot) is the current directory... (dot-dot) is the parent directory. Use the Linux command cd to change directories. Use dot-dot to move up the tree. cd.. Use the directory name to move down. cd recipes Use the complete directory name (path name) to move anywhere. cd /afs/umbc.edu/users/j/d/jdoe28/home/recipes/ 16

Absolute Path The absolute path is a path that contains the root directory and all other subdirectories you need to access the file It points to the same location in the directory tree regardless of the current working directory An example of an absolute path /afs/umbc.edu/users/j/d/jdoe28/home/recipes/ Starts with / 17

Relative Path The relative path is a partial path to a file in relation to the current working directory If inside of the home directory in the previous directory example, a relative path would be Does not start with / recipes/cookies/ 18

Frequently Used Linux Commands passwd, man, lpr pwd, ls, cat, more, cd, cp, mv, rm, mkdir, rmdir ctrl-c Time to take notes! References: Linux man page Links from the 104 homepage Books and the Internet 19

Wildcard Characters You will find wildcard characters useful when manipulating files (e.g., listing or moving them). The wildcard characters are * and?? is used to represent any single character. For example, ls hw?.txt would match the files hw1.txt and hw2.txt but not hw123.txt * is used to represent 0 or more characters. For example, ls hw*.txt would match the files hw1.txt and hw2.txt, as well as hw.txt, hw123.txt and hw_assignment.txt 20