Introduction to the Linux Command Line

Similar documents
Mills HPC Tutorial Series. Linux Basics I

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

CS CS Tutorial 2 2 Winter 2018

CS Fundamentals of Programming II Fall Very Basic UNIX

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Introduction to Linux

Introduction: What is Unix?

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Session 1: Accessing MUGrid and Command Line Basics

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Week 2 Lecture 3. Unix

Introduction to Linux Basics

Unix Workshop Aug 2014

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Unix Filesystem. January 26 th, 2004 Class Meeting 2

commandname flags arguments

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Introduction to the UNIX command line

A Brief Introduction to Unix

The Linux Command Line & Shell Scripting

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Working with Basic Linux. Daniel Balagué

CISC 220 fall 2011, set 1: Linux basics

UNIX File Hierarchy: Structure and Commands

CS 261 Recitation 1 Compiling C on UNIX

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

User Guide Version 2.0

Some Linux (Unix) Commands that might help you in ENSC351

Linux Command Line Primer. By: Scott Marshall

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

Linux at the Command Line Don Johnson of BU IS&T

Basic UNIX commands. HORT Lab 2 Instructor: Kranthi Varala

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Common UNIX Commands. Unix. User Interfaces. Unix Commands Winter COMP 1270 Computer Usage II 9-1. Using UNIX. Unix has a command line interface

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Introduction to Linux. Fundamentals of Computer Science

Introduction to Linux for BlueBEAR. January

The Unix Shell & Shell Scripts

Outline. Structure of a UNIX command

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

SECTION -C. Getting Started with UNIX

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

AN INTRODUCTION TO UNIX

Operating Systems. Copyleft 2005, Binnur Kurt

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Introduction to Linux Workshop 1

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Physics REU Unix Tutorial

CSCI 2132 Software Development. Lecture 4: Files and Directories

CSCE 212H, Spring 2008, Matthews Lab Assignment 1: Representation of Integers Assigned: January 17 Due: January 22

Getting Started with UNIX

UNIX Quick Reference

Chapter-3. Introduction to Unix: Fundamental Commands

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group.

CS4350 Unix Programming. Outline

Essential Linux Shell Commands

Introduction to Unix: Fundamental Commands

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Linux Shell Script. J. K. Mandal

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Getting Started With UNIX Lab Exercises

Find out where you currently are in the path Change directories to be at the root of your home directory (/home/username) cd ~

CS Unix Tools. Lecture 2 Fall Hussam Abu-Libdeh based on slides by David Slater. September 10, 2010

Introduction to Linux

Linux & Shell Programming 2014

Linux Introduction Martin Dahlö Valentin Georgiev

bwunicluster Tutorial Access, Data Transfer, Compiling, Modulefiles, Batch Jobs

CS197U: A Hands on Introduction to Unix

Basic Survival UNIX.

Unix Tutorial. Beginner. CS Help Desk: Marc Jarvis (in spirit), Monica Ung, Corey Antoniuk 2015

LAB #5 Intro to Linux and Python on ENGR

Lab Working with Linux Command Line

Introduction of Linux

Introduction to Linux

UTA Tech Orientation Spring 2019

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

Using the Zoo Workstations

Introduction to Linux Environment. Yun-Wen Chen

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Oxford University Computing Services. Getting Started with Unix

INTRODUCTION TO BIOINFORMATICS

Files

Introduction to Linux

An Introduction to Unix

Linux/Cygwin Practice Computer Architecture

CSC111 Computer Science II

CHE3935. Lecture 1. Introduction to Linux

Exercise Sheet 2. (Classifications of Operating Systems)

Computer Systems and Architecture

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Unix Basics. Systems Programming Concepts

Transcription:

Introduction to the Linux Command Line May, 2015

How to Connect (securely) ssh sftp scp Basic Unix or Linux Commands Files & directories Environment variables Not necessarily in this order.?

Getting Connected ssh Secure Shell Provided with Mac OS X and Linux ssh -Y username@somehost.ace-net.ca Windows users need PuTTY or MobaXterm http://www.chiark.greenend.org.uk/~sgtatham/putty/ download.html http://mobaxterm.mobatek.net/

Login If you have a Mac or a Linux machine, open a terminal window and type: > ssh userid@host.ace-net.ca If you have MobaXterm or PuTTY, create a new SSH session for an ACENET cluster, one of: fundy.ace-net.ca glooscap.ace-net.ca mahone.ace-net.ca placentia.ace-net.ca

Looking Around pwd ls print working directory where am I? list what files are here? what subdirectories?

Directories Grow on Trees Okay upside down trees! /home/rdickson/new rdickson thesis code.c data more_ data Just files within folders within folders, except we call the folders directories.

Getting Around mkdir newdir cd directory cd.. make directory change directory.. means parent directory or one level up. means right here ~ means my home directory

Create An (Empty) Directory $ mkdir workshop $ cd workshop $ ls $ pwd /home/rdickson/workshop $

Moving Stuff Around mv from to move, also rename cp from to copy rm file remove Careful --- There's no recycle bin! rmdir directory

Paths, Directories, Abbreviations Directory separator is / /home/jsmith/code/test is an absolute path begins with / code/test is a relative path no / at the beginning same thing if pwd is /home/jsmith * (asterisk) wildcard, expands to matching filenames

Get Some Files $ pwd /home/rdickson/workshop $ cp /home/rdickson/new/rdickson/*. $ ls data more_data

What s Inside? cat file more file less file Scroll through file, one screen at a time Spacebar to continue, q to quit, b to back up Editors vim file emacs file or use your computer and transfer with sftp

File Permissions Sometimes you need to edit the permissions of a file. The permissions of a file dictate who can execute, read and write to a file. If you do ls - l you might see something like the following: -rwxr-xr-x 1 staveley TechTeam 271 Jul 12 2007 Makefile Third group of 3: What everyone else can do Second group of 3: What group members can do First group of 3: what you (owner) can do --- read, write, execute?

File Permissions u - user g - group o - others a - all +r +rw +rwx +x +rx -r -rw -rwx -x -rx To see a directory listing you must have execute permission To change permissions, use chmod $ chmod g+rwx some_file

What will happen if I...? which program shows absolute path of program echo $PATH find what directories are searched for executables? $PATH is an environment variable Locates files Example : find./ -name ch*

Storage Management quota your disk space limits du - disk usage - how much disk space is being used by the current directory du -h - human readable df - how much disk space is available

Data From the Outside World Or from one cluster to another sftp Secure File Transfer Protocol Provided with Mac OS X and Linux sftp username@somehost.ace-net.ca Easiest way to move data between clusters MS Windows? Use MobaXterm or WinSCP http://winscp.net/eng/index.php

WinSCP

sftp Commands ls List files already there put filename Copy file from here to there Can use wildcards: put * copies everything get filename cd directory Change directory there lcd directory Local cd, change directory here

Where To Go For Help man command manual man -k keyword searches online manual pages Online Linux tutorials Google Unix command line tutorial

Where Else To Go For Help ACENETUser Wiki http://www.ace-net.ca/wiki/acenet User support line email: support@ace-net.ca