Command Line Crash Course For Unix



Similar documents
Tutorial 0A Programming on the command line

Command Line - Part 1

Unix Sampler. PEOPLE whoami id who

Command-Line Operations : The Shell. Don't fear the command line...

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

ICS 351: Today's plan

An A-Z Index of the Apple OS X command line (TERMINAL) The tcsh command shell of Darwin (the open source core of OSX)

Beyond Windows: Using the Linux Servers and the Grid

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

Open Source Computational Fluid Dynamics

CS 103 Lab Linux and Virtual Machines

1 Basic commands. 2 Terminology. CS61B, Fall 2009 Simple UNIX Commands P. N. Hilfinger

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

Tutorial Guide to the IS Unix Service

Basic Linux & Package Management. Original slides from GTFO Security

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

Hadoop Hands-On Exercises

New Lab Intro to KDE Terminal Konsole

INASP: Effective Network Management Workshops

Introduction to Mac OS X

Syntax: cd <Path> Or cd $<Custom/Standard Top Name>_TOP (In CAPS)

Unix Guide. Logo Reproduction. School of Computing & Information Systems. Colours red and black on white backgroun

Thirty Useful Unix Commands

A UNIX/Linux in a nutshell

Basic C Shell. helpdesk@stat.rice.edu. 11th August 2003

Hadoop Hands-On Exercises

Lab 1: Introduction to the network lab

Introduction to Shell Programming

LSN 10 Linux Overview

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment

QUICK START BASIC LINUX AND G++ COMMANDS. Prepared By: Pn. Azura Bt Ishak

WinSCP PuTTY as an alternative to F-Secure July 11, 2006

Introduction to Linux operating system. module Basic Bioinformatics PBF

CSIL MiniCourses. Introduction To Unix (I) John Lekberg Sean Hogan Cannon Matthews Graham Smith. Updated on:

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

Linux Labs: mini survival guide

Unix the Bare Minimum

CS 2112 Lab: Version Control

The Linux Operating System and Linux-Related Issues

Recommended File System Ownership and Privileges

An Introduction to the Linux Command Shell For Beginners

A Crash Course on UNIX

Programming for GCSE Topic H: Operating Systems

Introduction to the UNIX Operating System and Open Windows Desktop Environment

Web Hosting: Pipeline Program Technical Self Study Guide

Cassandra Installation over Ubuntu 1. Installing VMware player:

Git - Working with Remote Repositories

Beginners Shell Scripting for Batch Jobs

Introduction to Running Hadoop on the High Performance Clusters at the Center for Computational Research

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

How To Use The Librepo Software On A Linux Computer (For Free)

Introduction to Operating Systems

Extending Remote Desktop for Large Installations. Distributed Package Installs

Student installation of TinyOS

Extreme computing lab exercises Session one

Adobe Marketing Cloud Using FTP and sftp with the Adobe Marketing Cloud

HP-UX Essentials and Shell Programming Course Summary

Basic Hadoop Programming Skills

Running Hadoop on Windows CCNP Server

University of Toronto

Lab 1 Beginning C Program

UNIX / Linux commands Basic level. Magali COTTEVIEILLE - September 2009

HDFS Installation and Shell

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

File Manager User Guide

L01 Introduction to the Unix OS

Tutorial: Using WestGrid. Drew Leske Compute Canada/WestGrid Site Lead University of Victoria

Ubuntu, FEAP, and Virtualiza3on. Jonathan Wong Lab Mee3ng 11/08/10

Unix for the Beginning Mage. A Tutorial by Joe Topjian

Using SVN to Manage Source RTL

UNIX, Shell Scripting and Perl Introduction

Cygwin command line windows. Get that Linux feeling - on Windows

Linux System Administration on Red Hat

List of FTP commands for the Microsoft command-line FTP client

Hands-On UNIX Exercise:

The objective of this lab is to learn how to set up an environment for running distributed Hadoop applications.

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

Basic Linux and Unix commands, editing and transfering files

Intro to Docker for CMS

ptg

First Steps. Remote Access Gateway IGW/922. with DIL/NetPC ADNP/9200

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

UNIX (LINUX) PRACTICAL 1 INTRODUCTION

Linux System Administration

Partek Flow Installation Guide

Using SVN to Manage Source RTL

Version Control with Subversion and Xcode

IBM Software Hadoop Fundamentals

Apache and Virtual Hosts Exercises

Setting up Radmind For an OSX Public Lab

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

CPSC2800: Linux Hands-on Lab #3 Explore Linux file system and file security. Project 3-1

LPI certification 101 exam prep, Part 1

Hadoop Basics with InfoSphere BigInsights

Introduction to the UNIX Operating System on IT Systems

Pen Test Tips 2. Shell vs. Terminal

The Einstein Depot server

Transcription:

Command Line Crash Course For Unix Controlling Your Computer From The Terminal Zed A. Shaw December 2011

Introduction How To Use This Course You cannot learn to do this from videos alone. You can learn about the subject from the video. But to really learn to do this subject requires the book. The book "Command Line Crash Course" is included, and it s meant to be a fast workbook that makes you do things. Do not just watch these videos and then think you re done. Videos + Book is the way to go.

Introduction About Linux vs. OSX Linux and Apple s OSX use the same kind of Unix shell called bash. I m going to use OSX because my screen capture system is on it. But I ll show you how to get to the terminal on Ubuntu when I cover Ex 1. Keep in mind that my paths might be different, so just adapt.

Introduction Introduction Exercises 1-3 Ex 1: The Setup Ex 2: Paths, Folders, Directories (pwd) Ex 3: Who Are You? (whoami)

Introduction Exercise 1 The Setup Finding your terminal program and getting it to run.

Introduction Exercise 2 Paths, Folders, Directories (pwd) Figure out where your terminal starts off using the "print workind directory" command. See how that maps to your desktop file browser.

Introduction Exercise 3 Who Are You? Figure out what username the computer thinks you use.

Directories Directories Exercises 4-8 Ex 4: Make A Directory (mkdir) Ex 5: Change Directory (cd) Ex 6: List Directory (ls) Ex 7: Remove Directory (rmdir) Ex 8: Moving Around (pushd, popd) Go to this section.

Directories Exercise 4 Make A Directory (mkdir) Create new directories with the "make directory" command mkdir.

Directories Exercise 5 Change Directory (cd) Change to different directories with the "change directory" command cd.

Directories Exercise 6 List Directory (ls) List out the contents of a directory.

Directories Exercise 7 Remove Directory (rmdir) Remove a directory, but they have to be empty. See how trying to remove a full directory causes an error.

Directories Exercise 8 Moving Around (pushd, popd) Temporarily moving to another directory with "push directory" (pushd). Come back by "popping the directory" off with popd.

Files Files Exercises 9-16 Ex 9: Making Empty Files (touch) Ex 10: Copy A File (cp) Ex 11: Moving A File (mv) Ex 12: View A File (less) Ex 13: Stream A File (cat) Ex 14: Removing A File (rm) Ex 15: Pipes And Redirection Ex 16: Wildcard Matching Go to this section.

Files Exercise 9 Making Empty File (touch) Sometimes you need to just make an empty file. The touch command does that.

Files Exercise 10 Copy A File (cp) Copy a file s contents to another file with the cp command.

Files Exercise 11 Moving A File (mv) Move a file to a new place with the mv (move) command. This can also be considered "renaming" a file.

Files Exercise 12 View A File (less) Take a quick look at a file with the less command. The less command is a modern version of an old unix command called more. Get it? Ahhh, how droll.

Files Exercise 13 Stream A File (cat) Dump the contents of a file to the terminal with cat.

Files Exercise 14 Removing A File (rm) Remove a file, and also remove whole directories. DANGER! You can totally destroy your files if you re not careful.

Files Exercise 15 Pipes And Redirection Send the output of one command to the input of another. Chain inputs and outputs to multiple commands.

Files Exercise 16 Wildcard Matching Run commands on whole batches of files with a "wildcard". The wildcard is also called a "regular expression". If you want to learn about regular expressions, take a look at my other book, Learn Regex The Hard Way.

Searching Searching Exercises 17-18 Ex 17: Finding Files (find) Ex 18: Looking Inside Files (grep) Go To This Section

Searching Exercise 17 Finding Files (find) Find files by their names and types with the find command.

Searching Exercise 18 Looking Inside Files (grep) Find files by their contents with the grep command.

Help Help Exercises 19-20 Ex 19: Getting Command Help (man) Ex 20: Finding Help (apropos) Go to this section.

Help Exercise 19 Getting Command Help (man) Why remember things when you can just look them up? The man command helps you get information on other commands. You can also do help or -h on many commands.

Help Exercise 20 Finding Help (apropos) Sometimes you don t even know the name of the command. Searching online is usually better, but if you re desperate, there s apropos.

Sessions Sessions Exercises 21-23 Ex 21: What s In Your Environment (env, echo) Ex 22: Changing Environment Variables (export) Ex 23: Exiting Your Terminal (exit) Go to this section.

Sessions Exercise 21 What s In Your Environment (env, echo) What the environment is and what it does. Find out what s in your environment using env and echo.

Sessions Exercise 22 Changing Environment Variables (export) Changing the environment contents using the export command. Using unset to remove an environment variable.

Sessions Exercise 23 Exiting Your Terminal (exit) Using exit to... exit.

Epilogue Next Steps Where To Go From Here Get the cheat sheet. Print it out and keep it near you. Force yourself to use it every day. Go to this chapter.