UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.

Slides:



Advertisements
Similar presentations
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Advertisements

NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
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
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
Embedded Programming and Robotics Lesson 13 Basic Linux 1.
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.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
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.
"Two of the most famous products of Berkeley are LSD and Unix. I don't think that this is a coincidence.” Anonymous.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
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”
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.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 9 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
The Command Line Mostly MS Dos with some UNIX/LINUX Copyright © Curt Hill.
Chapter Two Exploring the UNIX File System and File Security.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Introduction to Programming Using C An Introduction to Operating Systems.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part B Shell Commands Professional Training.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
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.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
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.
Learning Unix/Linux Based on slides from: Eric Bishop.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
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.
Department of Computer Engineering
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.
Web Programming Essentials:
Introduction to Unix May 24, 2008 Rabat, Morocco Hervey Allen
Andy Wang Object Oriented Programming in C++ COP 3330
Lecture 2 Working with Files and Directories
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Assignment Preliminaries
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Exploring the UNIX File System and File Security
Unix : Introduction and Commands
Compilers, Make and SubVersion
Operating Systems and Using Linux
Operating Systems and Using Linux
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Andy Wang Object Oriented Programming in C++ COP 3330
Tutorial Unix Command & Makefile CIS 5027
Yung-Hsiang Lu Purdue University
Module 6 Working with Files and Directories
What is Unix? A multi-user networked operating system
Lab 2: Terminal Basics.
Presentation transcript:

UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill

Introduction Unlike in DOS there is nothing like internal commands Rather, every command is an executable Executables are not indicated by an extension either Most commands are in a portion of file system owned by the OS You may also create your own programs which are not commands The concept of the path originated in UNIX so commands may be in your space Copyright © 2017 – Curt Hill

General UNIX and LINUX are case sensitive Files and commands must be in the correct case Most commands are usually all lower case Copyright © 2017 – Curt Hill

Accessing the System Unless you want to use a dual boot or Virtual machine type of approach, we will usually connect to a machine through the network We need a client program that will do the connection and allow us to login and send commands We will use the Windows PuTTY The TTY is the TeleTYpe abbreviation This is a window with a console in it Copyright © 2017 – Curt Hill

PuTTY Copyright © 2017 – Curt Hill

Notes We put in an IP or machine name in the host name Specifying SSH gets the right port Secure Shell We then click Open to get to the login screen Our server will want a login name and password We then typically get the following screen Copyright © 2017 – Curt Hill

The Login Screen Copyright © 2017 – Curt Hill

Notes The login name is visible Reproduced for the password The password is blackened when type so not visible Most of the screen shots are from a Raspberry PI It uses Raspberrian a Debian Linux derivation However, the next is from Ubuntu Copyright © 2017 – Curt Hill

Initial Logged in Screen Copyright © 2017 – Curt Hill

File Commands Now that we can login it is time to look at the normal file commands We need to be able show the contents of directory, move, copy, delete and the like However, first we have to consider options Copyright © 2017 – Curt Hill

Command Line Options Almost every command has a plethora of options This presentation will cover only a few for each command These are preceded by a dash MS uses the forward slash Options generally come first after the command name Copyright © 2017 – Curt Hill

File Specification Wild Cards The usual: * is zero or more characters UNIX does not believe in name+extension The * can cover a . as well ? Any one character [ ] Any characters in the brackets Regular expression set Copyright © 2017 – Curt Hill

LS This shows the contents of the directory You may specify a file or file specification There are a variety of options l gives the long listing Copyright © 2017 – Curt Hill

Picture Copyright © 2017 – Curt Hill

Notes The prompt is showing the directory The default behavior is to sort the results The long option shows the directories and permissions Owner Group World Read Write eXecute Copyright © 2017 – Curt Hill

CP Short for copy cp src dest May do simple files or entire directories Two options to mention n do not overwrite like named files r recursively copy subdirectories Copyright © 2017 – Curt Hill

CAT Short for concatenate cat file Typical way to copy things to the console Multiple files may be specfied Copyright © 2017 – Curt Hill

Picture Copyright © 2017 – Curt Hill

MV Move mv src dest mv is like cp but deletes the original This is the usual way to rename a file as well Copyright © 2017 – Curt Hill

RM Remove is delete It will delete files Use rmdir for directorie However, -r will recursively remove directories and files Easy for this to get out of hand The i option prompts for each deletion Copyright © 2017 – Curt Hill

CD or CHDIR The change directory command cd is short for chdir The abbreviation is much newer than original Very similar to the DOS command There is no man for cd but chdir Copyright © 2017 – Curt Hill

MKDIR Create a new directory No abbreviation for this one Copyright © 2017 – Curt Hill

RMDIR Removes a directory Directory must be empty This may include multiple directories Copyright © 2017 – Curt Hill

MAN Short for manual – this is the help of UNIX Format is: man cmd Whenever you don’t know use the man page to find the parameters Copyright © 2017 – Curt Hill

MAN MAN Copyright © 2017 – Curt Hill

Exiting The logout command exits the system The exit command will also do it Copyright © 2017 – Curt Hill

Conclusion This is not the conclusion – we have more to do This should give the ability to manipulate the files of our directories We will need a demo and then more commands of other types Copyright © 2017 – Curt Hill