CS197U: A Hands on Introduction to Unix



Similar documents
LSN 10 Linux Overview

II. Installing Debian Linux:

Local Caching Servers (LCS): User Manual

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

The BackTrack Successor

Net/FSE Installation Guide v1.0.1, 1/21/2008

How to Install and Run Tibia on Linux Using Wine without Windows Contents

Recommended File System Ownership and Privileges

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Preparing Your Computer for LFS101x. July 11, 2014 A Linux Foundation Training Publication

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Massey University Follow Me Printer Setup for Linux systems

Installing Proview on an Windows XP machine

Online Backup Client User Manual

Of Penguins and Wildebeest. Anthony Rodgers VA7IRL

Verax Service Desk Installation Guide for UNIX and Windows

Web Hosting: Pipeline Program Technical Self Study Guide

Desktop Linux Distribution. { Showdown } Jeff Osier-Mixon

Installing an open source version of MateCat

What s New in Propalms VPN 3.5?

Accessing RCS IBM Console in Windows Using Linux Virtual Machine

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

How To Install Acronis Backup And Recovery 10 On A Computer Or Network With A Hard Drive (For A Non-Profit)

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

Getting Started with VMware Fusion. VMware Fusion for Mac OS X

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

Installing Booked scheduler on CentOS 6.5

A+ Guide to Software: Managing, Maintaining, and Troubleshooting, 5e. Chapter 3 Installing Windows

The Rockefeller University I NFORMATION T ECHNOLOGY E DUCATION & T RAINING. VPN Configuration Guide for PC/Mac/Linux

Penetration Testing LAB Setup Guide

Partek Flow Installation Guide

IT6204 Systems & Network Administration. (Optional)

Introduction. Installation of SE S AM E BARCODE virtual machine distribution. (Windows / Mac / Linux)

Operating System Structures

Personal Virtual Server (PVS) Quick Start Guide

How to Use? SKALICLOUD DEMO

1. Install a Virtual Machine Download Ubuntu Ubuntu LTS Create a New Virtual Machine... 2

Code::Blocks Student Manual

CPE111 COMPUTER EXPLORATION

Creating a Linux Virtual Machine using Virtual Box

Installing Windows On A Macintosh Or Linux Using A Virtual Machine

Server & Client Optimization

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

User Manual of the Pre-built Ubuntu Virutal Machine

Intro to Virtualization

User Manual of the Pre-built Ubuntu 9 Virutal Machine

OpenGeo Suite for Linux Release 3.0

ECT362 Installing Linux Virtual Machine in KL322

Create a virtual machine at your assigned virtual server. Use the following specs

LinMin Bare Metal Provisioning April 15, Functional Overview White Paper

Using Virtual Machines

Installing an IBM Workplace/Portal Server on Linux

Linux Getting Started Guide

Creating a DUO MFA Service in AWS

INASP: Effective Network Management Workshops

1. Install a Virtual Machine Download Ubuntu Ubuntu LTS Create a New Virtual Machine... 2

Vembu BDR v Release Notes. Major features in v Other features in Vembu BDR. Cloud Disaster Recovery Service. VMware UltraBlaze.

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

NetPoint Configuration Guide. for thin clients

Using Keil software with Linux via VirtualBox

RecoveryVault Express Client User Manual

How to Restore a Linux Server Using Bare Metal Restore

ODP REGIONAL NODE DEPLOYMENT QUICK GUIDE FOR TRAININGS

Linux System Administration on Red Hat

Online Backup Linux Client User Manual

1. Product Information

Online Backup Client User Manual

You can find a lot of great resources on the internet for setting up VNC on Linux!

Online Backup Client User Manual Linux

After studying this lesson, you will have a clear understanding of, what an Operating System is. functions of an Operating System

Linux - CentOS 6 Install Guide

Deployment - post Xserve

Local Caching Servers (LCS) February 2015

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

NAS 249 Virtual Machine Configuration with VirtualBox

ARMSDK-VM Virtual Appliance A preconfigured Linux system

Backing Up TestTrack Native Project Databases

Additional Information: SSH, PuTTY, and VmWare

Quick Start Guide for Parallels Virtuozzo

EVault for Data Protection Manager. Course 361 Protecting Linux and UNIX with EVault

Virtualization Technology (or how my Windows computer gave birth to a bunch of Linux computers)

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Attix5 Pro Server Edition

Back Up Linux And Windows Systems With BackupPC

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

Installation & Upgrade Guide

IT-ADVENTURES PLAYGROUND (ISERINK) Remote Setup Guide IOWA STATE UNIVERSITY INFORMATION ASSURANCE CENTER

Building a Private Cloud Cloud Infrastructure Using Opensource

Overview April 13, 2007 Copyright 2007 Tenable Network Security, Inc.

Quick Start Guide for VMware and Windows 7

PARALLELS SERVER 4 BARE METAL README

Acronis Backup & Recovery 11.5

Acronis Backup & Recovery 10 Server for Linux. Quick Start Guide

Virtual Appliance for VMware Server. Getting Started Guide. Revision Warning and Disclaimer

BF2CC Daemon Linux Installation Guide

NoMachine (free version) Installation Guide

Transcription:

CS197U: A Hands on Introduction to Unix Lecture 4: My First Linux System J.D. DeVaughn-Brown University of Massachusetts Amherst Department of Computer Science jddevaughn@cs.umass.edu 1

Reminders After today we are done half of the lectures Assignment 2 was due before class Assignment 3 has been up Please START EARLY so there is time to resolve any problems As always, let me know if you are skipping an assignment If you have questions, email me. 2

Outline Last class... Learned what an OS does Multi-tasking, resource management, and security Overview of Linux file system structure File permissions 3

File permissions Control access for the user, group, or world (everyone else) group means everyone in the user s group (excluding the user) Abbreviation to use with chmod: g world means everyone who is not in the user s group Abbreviation to use with chmod: o all means everyone Abbreviation to use with chmod: a chmod - R a+x <dir> Recursively change permissions for all the files + dirs in <dir> a o g u 5

Be careful when you run this command What s the most dangerous command you can run? elnux3> rm rf * Removes everything in the current directory, including subdirectories Without asking you for confirmation! (- f flag) Depends on where you run this command Run in home directory? Contents of home directory are GONE! DON T do these things! Run in root /? Almost everything on the hard disk will be GONE! To remove everything you would have to run the command with sudo We will learn about sudo in this lecture 6

Outline This class: Linux distributions Using virtualization to run Linux on your own computer Installing software in Linux 7

What OS is most popular? Web users" source: http://www.w3schools.com (Dec 2011) Web Servers" source: http://news.netcraft.com (spring 2010) Win7 Vista Win XP Linux Mac Windows Linux 5% 9% 19% 47% 34% 5% 81% 8

Linux distributions You don t really install Linux like you would Windows Vista There is one linux kernel... but lots of different linux distributions A distribution is: A linux kernel (the core OS) A collection of pre-packaged applications Sometimes: a window manager with graphical interface 9

Top distributions Ubuntu - rose to popularity due to ease of use Debian - Ubuntu s parent RedHat, Fedora, CentOS Slackware - known for simplicity Gentoo FreeBSD... hundreds more 10

Distribution Popularity Mint is based on Ubuntu Avg Hits / day Data biased towards desktop users source: http://distrowatch.com/stats.php (fall 2011) 11

Ubuntu 2004: Made it easy to install Linux (nice installer, single CD) Provided helpful forums and wiki Pretty revolutionary compared to previous approaches... Multiple CDs for Redhat Gentoo compiles the entire system from scratch Mainly designed for personal use, not for running servers 12

Window Managers: Gnome vs KDE Underneath, all Linux distros are very similar Same Linux kernel, general libraries, basic utilities Graphically, may look very different depending on the window manager Gnome and KDE are the most popular window managers Some software requires a specific window manager generally if it starts with a G or a K... 13

Outline This class: Linux distributions Using virtualization to run Linux on your own computer Installing software in Linux 14

Running multiple operating systems Dual Boot - install two operating systems on one computer Need either two hard disks, or two disk partitions If you do this, be careful Install Windows first, then Linux Linux will setup a boot loader to let you switch between OSes at startup Virtualization - run a second operating system inside the first The second OS is run as a Virtual Machine (VM) VM tricks OS running inside it into thinking it owns the full machine Can run multiple VMs at once 15

Virtualization Several different virtualization methods Full Virtualization: A control program produces virtual machines Used for: Sharing a system between multiple users Isolating users/systems Full Virtualization App 1 App 2 Windows or Linux Virtualization Platform 16

Virtualization Hosted virtualization: Operating system runs the virtualization software Used for: Running apps for a different OS than you use Testing possibly unstable applications or OS We will use this It s easy and free Hosted Virtualization VMs App 1 App 1 App 2 Windows or Linux App 2 Windows 17

Virtualization platforms VMware - biggest virtualization company Makes both hosted and full virtualization platforms Has several free versions Xen - started as open source project, now part commercial Runs under Linux only Virtualbox - sort of open source Runs in Windows, Linux, or OS X Can host Windows or Linux VMs KVM - for Linux only Parallels - for Macs only 18

Using Virtualbox It will ask you to register." You can just cancel Available on Edlab machines in Linux only Or you can install it on your own computer: http://www.virtualbox.org/ The VirtualBox control program lets you Create new virtual machines Start / Stop VMs Adjust configuration Amount of RAM Disk size Network settings 19

Your first Ubuntu virtual machine We will create a basic Ubuntu VM for you to start with To create the VM, choose Import Appliance from the File menu If you do this on your own system, you will have to download our template Start the new VM, and watch it boot up Clicking inside VM display window captures the mouse / keyboard Press [right ctrl] key to release (varies by host operating system) Setting up VM is part of next HW 20

Virtualbox DEMO 21

Starting with Ubuntu Log in with user/pass: cs197u / cs197u First things first: Change the account password: type passwd in a terminal Don t forget the new one! Resources: http://www.ubuntupocketguide.com/ - free guide (no pictures) https://help.ubuntu.com/9.04/index.html http://library.gnome.org/users/user-guide/stable/index.html.en 22

Outline This class: Linux distributions Using virtualization to run Linux on your own computer Installing software in Linux 23

Administration: being a super user In the Edlab you are a basic user Limited permissions Can t write outside your home directory Can t install new software Inside your VM, YOU are in control Try not to break things... but if you do, it s easy to restore! The root user Root is a special account for the most powerful administrator If you are root you can do anything 24

Becoming root Don t want to use root as main account Only switch to root when needed Use su - switch user command su root can be used with any username: su Will ask for password! <username> Ubuntu: Don t have to create a root account Helps reduce security issues 25

sudo - safely acting as root Lets you run a command as if you were root Does not require a root account to exist You must be on the sudoers list to use sudo Usage: sudo command Will probably ask you for your password 26

Getting software How to install software? In Windows or OS X, basic OS is always the same Easy to add new software because dependencies are known but two Linux systems may have very different configurations, drivers, libraries, etc! Software repositories You could build all applications from source code A lot easier to use distro specific repositories yum, RPM, apt-get, portage, etc 27

Manual Installation Fetch source/binaries and install by hand Advantage: customizable Advantage: no limitations to what can be installed Disadvantage: must manage everything Disadvantage: tedious First step: get the source code, usually stored as a tar ball compressed file.tar.gz or file.tgz extract using tar -xzf file.tar.gz 28

make - installing from source make is a tool to help compile complex software Typical steps to build application from source code./configure - verifies that you have proper libraries, sets configuration make - compiles all of the source code in a temporary directory will use things like gcc, g++, javac, etc make install - copies the compiled executables and libraries to their proper homes Do only the last step as root! otherwise bugs in the build process could corrupt important files in general, don t do something as root unless it is required 29

Package Managers Ubuntu/Debian: apt-get FreeBSD: addpkg, Redhat: rpm, Centos/Fedora: yum Database of packages, requirements, etc Install/update/uninstall programs fetch, install, update, and delete packages Advantage: easier and faster than manual installation or compiling Disadvantage: packages are usually not compiled on-site Disadvantage: package database doesn t have everything Disadvantage: doesn t allow customization 30

apt-get - using a package manager apt- get can install, remove, and provide information about software To use, you must either be logged in as root, or use sudo ubuntu> apt- get install firefox E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? ubuntu> sudo apt- get install firefox Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed:... 31

Ports Collections FreeBSD, Gentoo Linux, Mac Ports Database of supported software for the OS Ports system fetches, compiles, and installs programs Automatically manages dependencies and updates Advantage: Compiled and optimized for current machine Advantage: More easily customizable Disadvantage: Takes time, space to compile 32

Lecture 4 Review There are lots and lots of Linux distributions We will use Ubuntu... because it s easy to use Virtualization is an easy way to run multiple OSes on one computer We will use Virtualbox... because it is free and already on the Edlab The Super User root is all powerful on Linux systems Ubuntu uses sudo instead of creating a root user 33