A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.

Slides:



Advertisements
Similar presentations
1 Introduction to UNIX Ke Liu
Advertisements

Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Exploring the UNIX File System and File Security
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
CS 202 Computer Science II Lab Fall 2009 August 27.
Guide To UNIX Using Linux Third Edition
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Looks like DOS…but more powerful.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Systems Programming Concepts
Learning basic Unix command IT 325 operating system.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Laboratory: Mechatronics Workshop, Room# E
Guide To UNIX Using Linux Fourth Edition
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
Cmsc 312 Operating Systems. UNIX? DOS – PC? VAX/VMS - mainframe Unix – PC, workstation, mainframe 1970 bell Lab For computer scientist? Why popular? Free.
Linux+ Guide to Linux Certification, Second Edition
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
UNIX File System by Tero Toikkanen, CAP02S. UNIX Multi-user system Multi-user system Multi-tasking system Multi-tasking system Wide selection of tools.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions.
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Linux+ Guide to Linux Certification, Third Edition
Introduction to Programming Using C An Introduction to Operating Systems.
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Agenda The Linux File System (chapter 4 in text)
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
The Unix File sytem. Introduction Tree structure …
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
What is Unix? A multi-user networked operating system –“Operating System” Handles files, running other programs, input/output Just like DOS or Windows.
Learning basic Unix command It 325 operating system.
Chapter 2: Exploring the UNIX File System (For Tuesday Section) File and File Systems.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Learning Unix/Linux Based on slides from: Eric Bishop.
Using UNIX Charles Duan FAS Computer Services June 12, 2016.
Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology File Naming Rules Relative vs Absolute pathnames Unix Commands:
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
UNIX The Basics Source:
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
Eric Shook Department of Geography Kent State University
UNIX Basics Internet Technology.
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Operating Systems and Using Linux
Operating Systems and Using Linux
Web Programming Essentials:
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
Presentation transcript:

A Mini UNIX Tutorial

What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there are different versions and variants of UNIX such as SunOS, Linux, Solaris, BSD, …

Basic UNIX  Most UNIX functionality is accessed through the UNIX prompt. Text based, like MS-DOS  Mastery of UNIX comes from being familiar with different commands We will cover some of the basic commands in this class Goal: to be able to navigate through the directories

UNIX Directory Structure  Files are grouped in the directory structure. The file-system is arranged like hierarchical tree structure.  The top of the tree is called “root” which usually contains several sub-directories. “/”(forward slash) is used to present the “root”.

What is Directory? Directories can hold files and other directories / binetc users tmp backup user1 user2 … usern public_html file1 index.html root

Pathnames  Absolute Pathnames In the previous tree /users/usern/file1 is an absolute pathname  Relative pathnames If you are already in the users directory, the relative pathname for file1 is usern/file1

More on UNIX paths  “~” (tilda) points to the user’s home directory. Useful if you are logging into a workstation with many users.  Many of the other paths are inaccessible and unimportant to you  ~ is the default working directory when you log in.  If you are user “usern”, then /users/usern/file1 is the same as ~/file1.  “.” refers to the current directory  “..” refers to the parent directory.  If you are in /users/usern/, then../ refers to /users/.

UNIX – Basic commands  man – manual. Use “man name” to bring up a manual entry for command or program name.  clear – clear. Clears the screen. Navigation  ls – list. Lists folders/files in a directory  cd – change directory. Use “cd name” to navigate to directory name.  pwd – print working directory. Prints the path of the current directory.  du – disk usage. Shows the disk usage of the current directory

UNIX – More commands Creation  mkdir – make directory. Use “mkdir name” to create a new directory in the current directory named name. Can also create multiple directories.  cp – copy. Use “cp file1 file2” to create a new file, file2 which is a copy of file1. Can also use “cp file(s) directory” to copy all file(s) to directory.  mv – move. Same as copy, but deletes the original file.

UNIX – More commands Deletion – Be careful with these!  rm – remove. Use “rm file(s)” to delete files  rmdir – remove directory. Use it to delete an empty directory  You can not recover your files after you removed them!

Some tips  “tab” is used for auto-complete. If a file/directory name was partly typed in, tab will auto-complete it. If there are multiple options, tab will auto-complete up to the point where the options branch and show you a list of possible options  “*” is used as a wild card. “rm blah*” removes all files which start with blah, so blah1, blah2, and blahblah would all be removed Using “cp public/* private/” copies all files in your public directory into your private directory, and keeps all file names intact.

More tips  “-r” is a common option that usually makes a command recursive, that is, it will execute the same command on all subdirectories. Commonly used to perform file commands on directories Using “cp private/* public/ -r” copies everything from the private folder to the public folder, and also copies all subdirectories. Using “rm –r *” deletes everything in the current directory and all sub-directories. Never use this in the root directory!

Programs  Some basic UNIX programs: emacs – text editing pico – another text editor gcc – C compiler pine – program for internet news and