Using Commands Introduction to Unix May 24, 2008 Rabat, Morocco Hervey Allen.

Slides:



Advertisements
Similar presentations
Tony Kombol.  A program that  receives commands from a text input device (e.g. keyboard)  passes them to the operating system to perform  In the.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Chapter One The Essence of UNIX.
PacNOG 6: Nadi, Fiji Using Commands in Linux Hervey Allen Network Startup Resource Center.
Using Commands Introduction to Linux June 16, 2009 Papeete, French Polynesia Hervey Allen.
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Josh Goodwin
Linux+ Guide to Linux Certification, Second Edition
Operating Systems.
1 Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET201.
Unix Presentation. What is an Operating System An operating system (OS) is a program that allows you to interact with the computer -- all of the software.
The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 145 Operating Systems Introduction to UNIX/Linux.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Linux Commands LINUX COMMANDS.
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.
TOPIC 5.0 LINUX SHELLS.
Using the “CLI” Unix / Linux Preparation Course May 25 Djibouti.
How do people communicate with computers?
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
EMT 2390L Lecture 2 Dr. Reyes. Outline What is the Shell Basic commands Linux Filesystem System commands.
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.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards.
CENT 305 Information Systems Security Linux Introduction.
CHAPTER 16: The User View of Operating Systems The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Using Commands Unix/IP Preparation Course July 19, 2009 Eugene, Oregon, USA
UNIX/LINUX SHELLS.  “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Operating Systems and Using Linux CMSC 104, Lecture 3 John Y. Park 1.
Using Commands Unix / Linux Preparation Course May 6, 2012 Serrekunda, The Gambia.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Unix Shell Basics Edited from Greg Wilson's "Software Carpentry"
CS2204: Introduction to Unix January 19 th, 2004 Class Meeting 1 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty.
1 FreeBSD Installation AFNOG X Cairo, Egypt May 2009 Hervey Allen.
Unix/Linux for beginners:
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
Introduction to Programming Using C An Introduction to Operating Systems.
Privileges: who can control what Introduction to Unix May 24, 2008 Rabat, Morocco Hervey Allen.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Using the “CLI” Unix / Linux Preparation Course June 9, 2013 Lusaka, Zambia.
File and Folder CLI Commands 12/24/ Agenda Overview of OS functions and the SHELL Internal v External Commands Command History Making & Modifying.
Linux Operating System History of Linux 1. Estimated Desktop Usage Share Windows 92.00% Linux Notes 1.02% January
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
Unix Advanced Shells Chapter 10. Unix Shells u Command Line Interpreter –once logged in, login gives control to a shell –it prompts for input, then parses,
© 2015 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
Gorman, Stubbs, & CEP Inc. 1 Introduction to Operating Systems Lesson 8 Linux.
CEG 2400 FALL 2012 Linux/UNIX Network Operating Systems.
Operating Systems and Using Linux Courtesy of John Y. Park 1.
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.
Learning Unix/Linux Based on slides from: Eric Bishop.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Papeete, French Polynesia
Introduction to Unix May 24, 2008 Rabat, Morocco Hervey Allen
UNIX & LINUX Operating Systems
Some Linux Commands.
Guide To UNIX Using Linux Third Edition
Chapter 2: System Structures
Unix : Introduction and Commands
Operating Systems and Using Linux
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Linux Shell Script Programming
Linux Professor Sabol.
introduction to Linux/Unix environment
Presentation transcript:

Using Commands Introduction to Unix May 24, 2008 Rabat, Morocco Hervey Allen

'08 Rabat GUIs and CLIs What's are some example GUIs?  Windows  Mac OS X (Darwin, X and Aqua)  Gnome, KDE (on Xwindow)‏ What about example CLIs?  DOS  CP/M  Unix/Linux shells (bash, csh, sh, tsh, etc.)‏

'08 Rabat Q. What's faster...? A Graphical User Interface: GUI? A Command Line Interpreter: CLI? A. For many (most) operations a CLI. Q. What's hard, or slower to do in a CLI? A. Copying multiple, unique files. A. Other?

'08 Rabat The format of a command command [options] parameters “Traditionally, UNIX command-line options consist of a dash, followed by one or more lowercase letters. The GNU utilities added a double-dash, followed by a complete word or compound word.” Two very typical examples are: -h --help and -v --version

'08 Rabat Command parameters The parameter is what the command acts on. Often there are multiple parameters. In Unix uppercase and lowercase for both options and parameters matter. Spaces are critical. “ -- help ” is wrong. “ --help ” is right.

'08 Rabat Some command examples Let's start simple: Display a list of files:  ls Display a list of files in a long listing format:  ls -l Display a list of all files in a long listing format with human-readable file sizes:  ls -alh

'08 Rabat Some command examples cont. Some equivalent ways to do “ ls -alh ”: ls -lah ls -l -a -h ls -l --all –human-readable Note that there is no double-dash option for “ -l ”. You can figure this out by typing: man ls Or by typing: ls --help

'08 Rabat Where's the parameter? We typed the “ ls ” command with several options, but no parameter. Do you think “ ls ” uses a parameter? What is the parameter for “ ls -l ”? It is “.” -- our current directory. “ ls -l ” and “ ls -l. ” are the same. We'll discuss files and directories in our next section.

'08 Rabat A disconcerting Unix feature If a command executes successfully and there is no output returned from the command execution this is normal. That is, if you type: cp file1 file2 The result is that you get your command prompt back. Nothing means success. Let's give this a try...

'08 Rabat A disconcerting Unix feature cont. Try doing the following on your machine: # cd [cd = change dir] # touch file1 [touch = create/update] # cp file1 file2 [cp = copy] The “#” indicates the command prompt. A “#” usually means you are the root user. A “$” for the command prompt indicates a normal user.

'08 Rabat Command confusion Almost all commands in Unix can be specified in several ways; from the options to the parameters. cp -f file1 file2 cp –-force file1 file2 cp -f file1 /directory/file2 Why might you use “ --force ” instead of just “ -f ”?

'08 Rabat Command confusion cont. Even worse, the order of options and parameters can vary. Thus pw usermod userid -G wheel -s /bin/sh pw usermod userid -s /usr/local/bin/bash -G wheel are the same. Finally, a few commands vary rules on spacing and and options, like MySQL: mysql -uuser -ppassword mysql –user=user --password=password

'08 Rabat Command confusion cont. Finally, command usage may vary between Unix and Linux. Command usage may vary between versions of Unix (Solaris, FreeBSD, AIX, etc.). Command usage across Linux distributions is almost always the same (Red Hat, Debian, Ubuntu, etc.).

'08 Rabat Using pipes In Unix it is very easy to use the result of one command as the input for another. To do this we use the pipe symbol “|”. For example: ls -l /sbin | sort ls -l /sbin | sort | more What will these commands do?

'08 Rabat Take advantage of the command line The command line in Unix is much more powerful than what you may be used to in Windows. You can easily edit long commands You can find and recover past commands You can quickly copy and paste commands.

'08 Rabat Your mission Should you choose to accept it... Pay close attention to options and parameters. Use “ man command ” or “ command --help ” to figure out how each command works. A command, generally acts upon it's parameter or parameters based on the options you give to the command...