Lab 2: Terminal Basics.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Accessing Files and Directories. How Directories Get Created OS installation: usr, dev, etc, export, kernel and others places to store installation.
T UTORIAL OF U NIX C OMMAND & SHELL SCRIPT S 5027 Professor: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
9-2 How do you copy/move/rename/remove files? How do you create a directory ? What is redirection and piping? Readings: See CCSO’s Unix pages andCCSO’s.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
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.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
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”
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
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.
CHAPTER 1 UNIX FOR NONPROGRAMMERS By U ğ ur Halıcı.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
Unix Basics Chapter 4.
Linux+ Guide to Linux Certification, Second Edition
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Tera Term Brian Smith Chris Vasse Zaheemat Adetoro William Newton Tom Presgraves.
40 Years and Still Rocking the Terminal!
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
Linux Commands C151 Multi-User Operating Systems.
2 Manual & Filestore Mauro Jaskelioff. Introduction Using the manual The UNIX filestore File permissions.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
The Unix File sytem. Introduction Tree structure …
Unix Fundamentals CS 127. File navigation cd - change directory cd /var/log cd /etc/apache2 cd ~/Desktop ~ is a shortcut for the home directory.
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Learning basic Unix command It 325 operating system.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
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.
CMSC 104, Version 8/061L03OperatingSystems.ppt Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Learning Unix/Linux Based on slides from: Eric Bishop.
1 Linux Commands. 2 Path You specify a file or directory by its path name:  the full, or absolute, path name or the one relative to a location. The full.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Tutorial of Unix Command & shell scriptS 5027
Getting started with CentOS Linux
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Viewing and Changing the Filing System
Linux file system "On a UNIX system, everything is a file;
Some Linux Commands.
C151 Multi-User Operating Systems
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
Eric Shook Department of Geography Kent State University
Ubuntu Working in Terminal
UNIX Basics Internet Technology.
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Using Linux Commands Lab 3.
Intro to UNIX System and Homework 1
Operating Systems and Using Linux
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
The Unix File System.
Getting started with CentOS Linux
Tutorial Unix Command & Makefile CIS 5027
The Linux Command Line Chapter 4
Module 6 Working with Files and Directories
The Linux Command Line Chapter 4
Presentation transcript:

Lab 2: Terminal Basics

Directories and File Systems Root directory – top most directory in a file system (“C:/“ for Windows, “/” for Unix/Mac) Home directory – directory for a specific user in a file system (“C:/Users/<USERNAME>” for Windows “/home/<USERNAME>” for Unix/Mac

Filepaths Two types: Absolute – always starts from the root directory Relative – starts from the current working directory

The Terminal Here is a breakdown of what we see in the terminal when we start it up learninglinux – username of the current person using the computer learninglinux-VirtualBox – the name of the computer ~ represents the filepath of the home directory $ prompt symbol

Print Working Directory (pwd) The pwd command will print the filepath of your current working directory

Manual Pages (man) The man command will display information about the given command The syntax is man [command]

Change Directory (cd) The cd command allows you to move around the file system between all the different types of directories By default, typing in cd in the terminal will take you back to your home directory

Change Directory (cd) The syntax for this command is cd [directory] To change to a different directory, you must specify which directory you want to go to You must give an absolute filepath of relative filepath of the directory

List Segments (ls) The ls command lets you view the files/directories in the current working directory Two optional arguments you should know a – will show ALL the files in the current working directory, including hidden files l – will show the files with more specific information in long format

List Segments (ls) Color File Type White Regular Text File Blue Directory Green Executables or Scripts Pink Images Cyan Links (shortcuts) Red Archives

List Segments (ls) The syntax is ls [options]

Making Files (touch, vim) There are multiple ways to make a new file touch [filename] This will create a new text file by default with the name filename vim [filename] Use the file command to see the the type of file

Making a Directory (mkdir) To make a new directory use the command mkdir The syntax is mkdir [directory name]

Copying Files (cp) To copy a file from one directory to another, use the cp command The syntax is cp [file] [destination] This will copy a file from the source directory to the destination directory

Copying Directories (cp) To copy an entire directory, you can still use the cp command The syntax is cp -r [directory] [destination] The r is an optional argument that will let you copy directory contents recursively

Removing Files (rm) To remove or delete a file, use the rm command The syntax is rm [filename]

Removing Directories (rm) To remove or delete an entire directory, you can still use the rm command The syntax is rm -r [filename] Like the cp command, the r is an optional argument that you need to specify to work on directories

Moving Files (mv) To move a file from one directory to another, use the mv command The syntax is mv [filename] [destination] This moves the file to the destination folder

Moving Directories (mv) To move an entire directory, you can still use the mv command The syntax mv -r [directory] [destination]

Renaming Files (mv) To rename a file, you can also use the mv command The syntax is mv [original filename] [new filename]