Using Linux and Lab Setup OS Lab 1

Slides:



Advertisements
Similar presentations
Explore KDE The easy way, using a live CD By Carl Weisheit.
Advertisements

NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
Working Environment - - Linux - -.
CSE 303 Lecture 2 Introduction to bash shell
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Red Hat Installation. Installing Red Hat Linux is the process of copying operating system files from a CD, DVD, or USB flash drive to hard disk(s) on.
A crash course in njit’s Afs
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Using the “CLI” Unix / Linux Preparation Course May 25 Djibouti.
Brief introduction to UNIX A. Emerson CINECA, High Performance Systems.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
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.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
2INC0 Operating Systems Introduction to Linux
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Working with Linux Lab 1 1. Login and logout Account – username & password – Note: Linux is case-sensitive Administrator: username = root Logout: exit,
Linux in a Virtual Environment Nagarajan Prabakar School of Computing and Information Sciences Florida International University.
Vim Editor and Unix Command gcc compiler Computer Networks.
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
HKOI 2012 TRAINING INTRO TO LINUX /CUHK/SHB123]$ date Sat Feb 18 13:00:00 HKT 2012.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Intro to Programming Environment 1. Today You Will Learn how to connect to a machine remotely with “nomachine NX client” Learn how to create a new “source.
Text Editing February 2 nd, 2004 Class Meeting 3.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Explore GNOME The easy way, using a live CD By Carl Weisheit.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
UNIX  Portable (common to many computer architectures), multitasking, multi-user operating system  Introduced by Bell labs in mid-1960’s  Thus, much.
Yep, you need to know this
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
Introduction to Unix for FreeSurfer Users
Precept I : Lab Environment, Unix, Bash, Emacs
Outline Installing Gem5 SPEC2006 for Gem5 Configuring Gem5.
Tutorial of Unix Command & shell scriptS 5027
EE516: Embedded Software Project 1
CS1010: Intro Workshop.
CSC227: Operating Systems
Development Environment Basics
Getting started with CentOS Linux
Install external command line softwares
OS Homework 1 February 22, 2017.
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
The Linux Operating System
Vi Introduction Tony Kombol.
Practice #0: Introduction
CSE 374 Programming Concepts & Tools
Tutorial of Unix Command & shell scriptS 5027
Engineering Innovation Center
Introduction to UNIX.
Tutorial of Unix Command & shell scriptS 5027
Introduction to Linux Week 0 - Thursday.
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Introduction Paul Flynn
Getting started with CentOS Linux
Working with Mac OS and Linux
Command line.
European Computer Driving Licence
Lab 2: Terminal Basics.
DIBBs Brown Dog Tutorial Setup
Presentation transcript:

Using Linux and Lab Setup OS Lab 1 TA:王嘉豪 Addr.:地理馆314 E-mail:jiahaowang@stu.ecnu.edu.cn QQ:523102520

Outline Lab Goal && what is pintos Lab Setup Linux Introduction Install the VirtualBox Install the project environment Linux Introduction Linux command Basic commands Handle files and directories Editor: Vim Compiler:gcc Bochs and Pintos install

Lab goal Analyze and improve a small operating system (Pintos) and , make a deeper understanding of the principle of operating systems and implementation mechanism.

What is pintos Welcome to Pintos. Pintos is a simple operating system framework for the 80x86 architecture. It supports kernel threads, loading and running user programs, and a file system, but it implements all of these in a very simple way. In the Pintos projects, you and your project team will strengthen its support in all three of these areas. You will also add a virtual memory implementation.

4 projects in pintos

Install the VirtualBox What is VirtualBox? Download VirtualBox Homepage: https://www.virtualbox.org/ Downloads: ftp://58.198.176.47/pub/oslab/ch-01/resources/VirtualBox-5.1.4-110228- Win.exe Support: Windows, MaxOS, Linux, etc. Documents: http://www.virtualbox.org/wiki/Documentation Newest version: 5.1.4 VirtualBox是一个跨平台的虚拟化应用,它可以运行在Windows,Mac,Linux等系统。在VB中可以同时运行多个操作系统,比如,在MAC系统运行Windows和Linux,在Linux系统上运行Windows。但是唯一的限制就是磁盘空间和内存大小是有限的。

Install the VirtualBox

Install the VirtualBox

Install the project environment Method 1: Install Ubuntu yourself on VirtualBox ! Method2: Import mirror file I have already made for you. Link : ftp://58.198.176.47/pub/oslab/ch-01/resources/oslab.ova

Method 1: Install Ubuntu Choose your Ubuntu img file ubuntu-16.04.1-desktop-amd64.iso Install Ubuntu on virtual box Choose OS: Linux 64 bit, Version: Ubuntu16.04 Memory: Share from your local memory size, e.g. 1024MB Hard Drive: Use an existing virtual hard drive file

Method 2: Import Appliance Start vbox Import the oslab.ova mirror to your virtual machine.

Setup the vbox Choose the oslab virtual machine, click Settings button on toolbar Click Storage in the left pane, and check whether the oslab is located under IDE Click Shared Folders in the left pane Click the button (Add New Shared Folder) on the right side Choose the path you want to share with oslab, and name it (and remember it!) Start the oslab, wait, user name: ’oslab’, password: ’oslab’ Open a terminal, type (and hit RETURN): sudo usermod -aG vboxsf $(whoami) Your root’s password is oslab

Linux Introduction Linux is a kernel Open source Linux OS includes Ubuntu openSUSE Fedora CentOS Red Hat SUSE Linux是一个操作系统的底层核心,Linux是一款免费的操作系统

Linux 学习推荐 http://cn.linux.vbird.org

Linux Command Basic commands Useful keys Useful commands Handle files and directories

Basic Commands Useful keys Tab words autocomplete ↑/↓ check history commands(history) Ctrl + c terminate command Ctrl + Shift +c/v copy/paste

Useful commands ls list files (ll/ls –l) cd change directory cat show file content less/more show file content in separate windows mkdir make directory rm remove a file (or a directory rm -r) rmdir remove directory cp copy something mv move something

sudo super user do(root) ~ (~/) home directory . (./) current directory pwd see the path of current directory su login with an user exit exit(quit/sign out) --help/-h get help man/info command info

head show top (10/n) lines of a file (-n) tail show bottom n lines of a file (-n) sort show files in sorted order uniq omit duplicated lines diff compare to files file test to see the basic info. about a file find find files ln link a file

tar pack and unpack tar -cvf all.tar x y z tar -xvf all.tar compress and decompress files tar -zcvf all.tar.gz x y z tar -xvzf all.tar.gz

Editor: Vim Start Vim: vim filename Level 1: Use as a text editor Level 2: Use as a Microsoft Word Level 3: Throw your mouse

Mode Normal mode insert mode edit move cursor search replace delete a i o r insert mode edit move cursor search replace delete copy Esc command mode : read 、save、close …

hjkl move arrow ←↓↑→ x/dw/dd delete a character/word/line f/F/t/T search a character / or ? search a string n/N next search result yw/yd copy word/line p/P paste u undo Ctrl + r redo :x/:wq save and quit :q! quit without save

Compiler: gcc Create file: vim filename.c Save and Close the filename Compile : gcc -o filename filename.c Execute: ./filename

Bochs install Install dependence on Ubuntu sudo apt-get install libncurses5-dev libx11-dev libxrandr-dev Install with `make` commond cd /home/oslab/Code/bochs-2.4.6 ./configure --enable-gdb-stub make sudo make install

Run Bochs Run bochs bochs

Configure pintos Edit with vim Vim ~/.bashrc Add line at bottom export PATH=$PATH:/home/oslab/Code/pintos/src/utils

Configure pintos Edit with vim cd /home/oslab/Code/pintos/src/utils vim Makefile Modify “LDFLAGS” to “LDLIBS”

Configure pintos Edit with vim cd /home/oslab/Code/pintos/src/misc vim gdb-macros Modify the path of `GDBMACROS`

Compile pintos Enter folder utils cd /home/oslab/Code/pintos/src/utils Make make Enter folder thread cd /home/oslab/Code/pintos/src/thread

Run pintos Enter folder build cd /home/oslab/Code/pintos/src/thread/build pintos -- run alarm-multiple

After class Setup on your machine following the instruction Get ready for next class——project 1 Team work! At most 3 classmates made-up of a team Please report your team members to your class monitor 蒋家宝 Get all resource at : ftp://58.198.176.47/pub/oslab/ch-01/