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

Slides:



Advertisements
Similar presentations
Unit 5 – User Administration Randy Marchany VA Tech Computing Center.
Advertisements

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.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
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.
Linux+ Guide to Linux Certification, Second Edition
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.
TOPIC 5.0 LINUX SHELLS.
Using the “CLI” Unix / Linux Preparation Course May 25 Djibouti.
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
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”
CENT 305 Information Systems Security Linux Introduction.
Using Commands Unix/IP Preparation Course July 19, 2009 Eugene, Oregon, USA
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Using Commands Unix / Linux Preparation Course May 6, 2012 Serrekunda, The Gambia.
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
Using Commands 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.
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,
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.
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
UNIX Filesystem and Hierarchy AfNOG 2008 Workshop May Rabat, Morocco.
Papeete, French Polynesia
Using Linux Kaya Oğuz Room: 310.
Introduction to the Linux Commandline
Chapter 11 Command-Line Master Class
Linux Command Basics I Tony Kombol.
UNIX & LINUX Operating Systems
Chapter 2: Operating-System Structures
Some Linux Commands.
introduction to Linux/Unix environment
Privileges: who can control what
Command Syntax Chapter 2 Using the DIR Command with
Operating Systems and Using Linux
Programming Assignment 1
Chapter 2: Operating-System Structures
LING 408/508: Computational Techniques for Linguists
CSE 390a Lecture 1 introduction to Linux/Unix environment
Guide To UNIX Using Linux Third Edition
Chapter 2: System Structures
Unix : Introduction and Commands
Shells, Help, and Paths.
CSE 390a Lecture 1 introduction to Linux/Unix environment
introduction to Linux/Unix environment
Operating Systems and Using Linux
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Lecture 5: UNIX & LINUX Operating Systems
introduction to Linux/Unix environment
Linux Shell Script Programming
Linux Professor Sabol.
introduction to Linux/Unix environment
Module 6 Working with Files and Directories
introduction to Linux/Unix environment
introduction to Linux/Unix environment
introduction to Linux/Unix environment
Introduction to Operating Systems
CIS 191 Linux and Unix Skills
Presentation transcript:

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

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.)

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?

command [options] parameters 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

The parameter is what the command acts on. 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.

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

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

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.

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...

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.

Command confusion cp -f file1 file2 cp –-force file1 file2 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”?

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

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.).

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?

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.

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...