Homework & Practical Let’s go through it Does anyone not have access to the wiki? Questions?

Slides:



Advertisements
Similar presentations
RH030 Linux Computing Essentials
Advertisements

Linux commands exercise 1. What do you need, if you try to these at home? You need to download and install Ubuntu Linux from the Internet – DVD is need.
PacNOG 6: Nadi, Fiji Using Commands in Linux Hervey Allen Network Startup Resource Center.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
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.
CS 497C – Introduction to UNIX Lecture 36: - Customizing the Environment Chin-Chih Chang
Information Networking Security and Assurance Lab National Chung Cheng University 1 What Linux is? Free Unix Like Open Source Network operating system.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Introduction to UNIX GPS Processing and Analysis with GAMIT/GLOBK/TRACK T. Herring, R. King. M. Floyd – MIT UNAVCO, Boulder - July 8-12, 2013 Directory.
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.
Using the Bash Shell. Linux Shell Options Linux provides a range of options for shells. bash –The GNU Bourne Again Shell (bash) bsh – The Bourne Shell.
Using the “CLI” Unix / Linux Preparation Course May 25 Djibouti.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Welcome to CSE  Name: Di Cao   Classroom: DL357  Class Time: T 8:30am - 9:18am  Office.
EMT 2390L Lecture 2 Dr. Reyes. Outline What is the Shell Basic commands Linux Filesystem System commands.
Review Did you get an from me? Last class we had an introduction to Linux and the command-line Linux: Kernel vs OS It is a kernel (brain of an OS)
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”
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
8 Shell Programming Mauro Jaskelioff. Introduction Environment variables –How to use and assign them –Your PATH variable Introduction to shell programming.
Module 1 Introduction to UNIX/Linux
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
CENT 305 Information Systems Security Linux Introduction.
An Introduction to Unix Shell Scripting
CS 2061 Shells Also known as: Unix Command Interpreter.
Grades Please hand in your homework Quizzes coming back today Current grade on back with missing assignments Anything missing can be turned in late There.
Chapter 4 UNIX Common Shells Commands By C. Shing ITEC Dept Radford University.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
Interacting with a UNIX computer: Navigating through the directory tree.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 11: Shell.
Shell Programming Any command or a sequence of UNIX commands stored in a text file is called a shell program. It is common to call this file a command.
Beyond sh Not everyone is as fond of UNIX as most other people. The tutorial talks about the dark side of UNIX.
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.
Quiz 15 minutes Open note, open book, open computer Finding the answer – working to get it – is what helps you learn I don’t care how you find the answer,
Using Commands Unix / Linux Preparation Course May 6, 2012 Serrekunda, The Gambia.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
A Genomics View of Unix. General Unix Tips To use the command line start X11 and type commands into the “xterm” window A few things about unix commands:
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
Homework & Review Questions? Everything after this is for accuracy – “All your permanent teeth are in, okay? You’re playing for keeps now!” -Psych Review:
Review Please hand in any homework and practicals Vim Scripting Inter-device communication.
Chapter 2. Bourne Shell (sh) Use sh instead of bash (Bourne Again Shell), to make your scripts more portable. sh – csh – tcsh - bash.
1 Day 18 Bash and the.files. 2 The.files ls shows you the files in your directory –Or at least most of them. –Some files are hidden. Try: ls –a –This.
Using the “CLI” Unix / Linux Preparation Course June 9, 2013 Lusaka, Zambia.
Review Please turn in any homework/practicals you may have Folders Paths Services Processes.
Manually Creating a New User Account Presented by Carl South.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
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,
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 Week 8 Creating Simple Shell Scripts. 2 Chapter Objectives  In this chapter, you will :  Learn how to create Shell Scripts  Commenting / Making Portable.
1 Lecture 7 Introduction to Shell Scripts COP 3353 Introduction to UNIX.
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.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Agenda Customizing a Unix/Linux account Environment Introduction to Start-up Files (.bash_profile,.bashrc,.profile,.kshrc) Safe Methods for Changing Start-up.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Getting Started with Linux
CS 350 Lecture 3 UNIX/Linux Shells by İlker Korkmaz and Kaya Oğuz.
Introduction to Unix for FreeSurfer Users
Discussion #11 11/21/16.
Prepared by: Eng. Maryam Adel Abdel-Hady
Part 3 – Remote Connection, File Transfer, Remote Environments
The Linux Operating System
Shells, Help, and Paths.
Linux Shell Script Programming
CSE 303 Concepts and Tools for Software Development
Lab 5: Complex Inputs.
Week 1 – Lesson 2: Creating Shell Scripts, Linux Commands
Lab 2: Terminal Basics.
Presentation transcript:

Homework & Practical Let’s go through it Does anyone not have access to the wiki? Questions?

Corporate Environment We only get 2 years with you (pending name change and bachelor’s degrees) I have about 17 more classes to help you become a better IT professional So If you don’t have everything current, I will bug you for it as if I was your boss

Corporate Environment This means, when class starts, if I am missing something from you, I will ask you to work on the missing assignment before the practical This course builds on everything before it. If you fall behind, you won’t understand what we’re doing I will ask you about it in class I will you I will bother you and bother you and bother you So please do your work

Today Paths – Absolute – Relative The Shell – Look and feel

Paths So far we have been dealing with things in our home folder ls cp teams.txt scratch.txt These things are all using the relative path The relative path is how to get to something on a system (file, command, etc…) from where you are right now Those files were in the student user’s home dir and as we were there too we didn’t have to provide any more info

So Relative Path Because we are automatically taken to tom’s home directory (or /home/tom), we are in the same directory as desktop So our path is the name of the file This is akin to your desktop in Windows People clutter their desktops with files – You can directly access them by clicking on them – It’s messy and people will judge you when they see it

Remember Tom? If ‘tom’ was our username:

Absolute Path When reading guides you will usually encounter absolute paths These always start with a / /home/tom /home/tom/documents /home/student /home/student/teams.txt /etc/httpd/conf/httpd.conf

Absolute Paths Always start with a / These lead down the “tree” to the specific location of a resource (file/command/whatever) So /home/student/teams.txt means start at / (the highest or top-level directory) Go into the home folder Go into the student folder Access the teams.txt file

Relative Paths Relative paths are more confusing I will use convoluted examples Usually, they’re only used in very simple situations – Going/accessing one/two levels (up or down) Two notations –. means “right here” –.. Means “up one level”

Relative Complexity If you cannot access them directly in your home folder, they’re in another folder/directory In the command line, to access something that’s not in your immediate directory, you have to tell the shell where to look For example: /sbin is not in our $PATH So if we want to use the ip command, we have to tell the shell where to go../../sbin/ip

.. We can use.. to access one directory level above ours – And we can chain them together (as the last slide showed) Most used with the cd command to ‘change directory’ cd.. Would take us from /home/tom to /home

Side by Side Absolute path vs relative path ~]$ cat /etc/profile Which way is used above? ~]$ cat../../etc/profile Which way is used above? ~]$ cd /etc etc]$ cat profile Which way is used above?

Mapped Out (Absolute) Absolute path ~]$ cat /etc/profile The shell sees the leading / in /etc/profile and immediately starts at the top, then moves down

Mapped Out (Relative) Relative path – cat../../etc/profile ~]$ cat../../etc/profile The shell starts in /home/student, moves up to /home, moves up to /, then moves down to /etc, and then to the /etc/profile

Full Linux Directory Structure

Another Look The relative path has to reflect our new position Assuming we want to access the ‘text’ file Where We AreRelative Path /home/tom/documentstext /home/tomdocuments/text /hometom/documents/text Does ‘Where We Are’ look familiar? It’s the Absolute path Why?

One Last Time Absolute Path /home/student /var/log/messages /etc/profile / /dev/sda1 Relative Path../../bin log/messages file../usr/../var/log ~

The Shell The shell is what we type in, and get response from We’re working with the ‘Bash’ shell – BASH – Bourne Again Shell (/bin/bash) – SH – Bourne Shell (/bin/sh) – ZSH – Z Shell (/bin/zsh) – CSH – C Shell (/bin/csh) – And more… Each one does things just a little differently Bash is the current standard but ZSH is “supposed” to extend it

Look and Feel ~]$ lx bash: lx: command not found ~]$ ls /notThere ls: /notThere: No such file or directory ~]$ ls –e /home ls: invalid option – e Try ‘ls --help’ for more information Bash tries to be intelligent and tell us where the error is

Bash Auto-Complete ~]$ ca cadavercaptoinfocat callcardcatchsegv callercase ~]$ cat tea ~]$ cat teams teams2.txtteams.txt ~]$ cat teams Through the ‘command’ and ‘argument’ sections of our model, the Bash shell will show us what we can use

Colors ~]$ ls folderscript.shteams2.txtteams.txt So we see – Folders/directories as blue – Scripts (collections of commands in a file to be run together) as green – Files as black

History ~]$ ~]$ ls ls was the last command we ran We can keep pressing up to go through all the commands we have run since the last time we cleared the history This is very useful for fixing errors

Fix It ~]$ cat /etc/passswd cat: /etc/passswd: No such file or directory ~]$ ~]$ cat /etc/passswd ~]$ cat /etc/passwd

Getting Unstuck Shell unresponsive? Try: – Pressing enter a few times – Pressing the q key – Pressing ctrl+z or ctrl+c – Pressing the escape key If you enter a command and you see > the shell is waiting for additional flags/args

Own Study Questions? Paths – Sobell Ch 4 – The Filesystem (81-89) Shell – Sobell Ch 5 – The Shell ( )