TUTORIAL LESSON Linux & Tools

Slides:



Advertisements
Similar presentations
SCILAB 科學軟體教學 撰寫者: 1.中央大學大氣科學系 楊善文 2. (為本文有貢獻者,記得在此留名。)
Advertisements

Linux 安裝入門與基本管理 課程目標: 學習Linux平台下的安裝設定 與 建置一個基本的Linux伺服器
上課教材 Database Slide Windows筆電 (32 bit)
DATE: 14/10/2009 陳威宇 格網技術組 雲端運算相關應用 (Based on Hadoop)
Foundations of Computer Science
操作系统 袁昕.
命令行操作 shell介绍 常见三种Shell ---Bourne shell(sh) ---C shell(csh)
Linux 網路教學 東南技術學院資訊工程系 職稱:講師 姓名: 曹茂勁 民國 92年 12月.
红旗Linux认证培训 课程介绍.
Linux 的檔案管理.
第六章 Linux的系統管理基礎 課前指引 身為Linux系統管理員,除了熟悉作業系統的安裝、圖形介面的操作及系統指令的使用與軟體套件的安裝外,更需要瞭解基礎的Linux系統管理技巧。本節,將針對此部分進行說明。
操作系统结构.
Linux 入門課程(介紹篇) 講者: Pank
電腦病毒簡介與應用軟體簡介 趙涵捷.
資訊安全與系統管理 2013/3/13 Chien wei lin.
UNIX系統與資料庫安裝 Why UNIX 常用的工具程式介紹 資料庫的安裝.
當企鵝龍遇上小飛象 DRBL-Hadoop Jazz Wang Yao-Tsung Wang
作業系統的結構 日期 : 2018/9/17.
Linux 的進階檔案處理.
Confidential Property
Linux.
主讲:邓 志 龙 Linux网络技术 主讲:邓 志 龙
Linux的認識與使用 2013/01/05.
雲端運算虛擬主機技術的發展.
Vi 編輯器的練習的說明 因為本課程的實習課是Unix 的工作環境。過去的經驗告訴我,如果你完全未用過Unix 的指令及其 vi 編輯器,你將很難跟上進度,希望學員一定要預先作練習。我們提供了Unix 指令的簡介,以及 vi 編輯器的介紹 ( 請参閱網站中的13&14-unix.pdf 為其講義;13-unix.exe、14-fortran.exe則為其課程錄影.
第2章 大数据处理架构Hadoop (PPT版本号:2017年2月版本)
第 2 章 上機使用 Unix/Linux 內容: 操作介面 主機連線 登入主機 認識系統環境 使用者常用命令.
課程名稱:計算機概論 授課老師:李春雄 博士
台灣大學計算機及資訊網路中心 教學研究組 張傑生
Basis基本操作、使用者 管理與權限設定
第4章 作業系統的介紹及操作.
Linux 圖形操作介面 GUI -- X-window 與 Webmin
虛擬化基本概念.
Linux 基础与常用命令简介 生物信息学培训班 杭州,2018年1月18日 周银聪.
Operating System Concepts 作業系統原理 CHAPTER 2 系統結構 (System Structures)
Linux环境高级编程实验.
讲议: PXE 介绍及实现 Jarvis
第二天 计算机基础技能培训 (一)linux基础知识
Linux server 連線軟體: 主機:kitty.cs.pu.edu.tw 帳號:dar 密碼:n….w.
Android 课程讲义 智能手机开发
曙光集群简明使用手册 技术支持中心.
網路資源的建立--LINUX系統 國立東華大學電算中心 陳鴻彬.
Linux基本操作 程設實習課 ( 2/25 ).
伺服器探索營 Day 1 指導老師: 張啟中 (JohnAxer) 教學助理:
1-1-1作業系統的功能 提供使用者操作介面 提供程式執行環境 控制輸入\輸出程序 分配系統資源 管理與維護磁碟中的檔案
Windows與Linux資源共享 SAMBA
作業系統 (Operating System)
Git & github By 宋正倫 (修訂by jmchen).
系统管理员培训(I期) 浙江省基层人民法院 -V8版介绍及系统管理培训 二OO八年四月二十三日 法院事业部经理:周春宏
檔案類型介紹 Linux 的檔案類型 目錄: 用ls –F時檔名後面有/,螢幕列出目錄時為藍色 可執行檔: 壓縮檔: 連結檔:
第二章 UNIX系统安装与常用命令.
雲端虛擬化 Cloud Virtualization
如何有效率的學習Linux 培養組合能力 多用程式, 少寫程式 從錯誤訊息中學習 養成略讀 “各種文件” 加強英文基本閱讀能力 勤作筆記
Confidential Property
第三章 UNIX的文件与目录.
Web Programming 網際網路程式設計
虚 拟 仪 器 virtual instrument
UNIX指令-檔案與目錄操作.
杨振伟 清华大学 第一讲:Linux环境下编程(1)
Lab01 工作站&Linux操作 日期:2011/03/07.
如何連上工作站 WorkStations: 1. Solaris 2. Linux Use X-Win32 (for Solaris)
第12章 Linux與 嵌入式uClinux系統
粒子物理与核物理实验中的数据分析 杨振伟 清华大学 第1讲:Linux环境下的编程.
第6章 硬盘实用程序 GHOST 6.0 硬盘克隆(Clone)、硬盘分区拷贝工具
杨振伟 清华大学 第一讲:Linux环境下编程(1)
Linux网络配置管理.
劉庠宏、林合治編著 國立高雄大學應用數學系 2005年3月1日
第六章 文件系统与文件管理 6.4 Linux文件管理 1、比较MS DOS 与 Linux的目录结构 一、Linux文件系统的树形结构
Presentation transcript:

TUTORIAL LESSON Linux & Tools Parallel Processing Institute(PPI) FuDan University 2017.9

BIRTH of TUTORIAL LESSON ICS introduces the Computer Systems, then WHO introduces ICS ? A new environment: Linux Many new tools: svn, … ICS Book does not contain them Parallel Processing Institute(PPI)

OUTLINE Pre-requisite Linux Tools

Pre-requisite Linux Tools

HARD RULES Deadline: No Extension Plagiarism: No Tolerance Multiple submissions Plagiarism: No Tolerance Forbid C&P from Network from Classmates Punishment 0 point for ALL Parallel Processing Institute(PPI)

Cheating will not be tolerated … All homework, labs and exams are to be done individually. It is your responsibility to ensure that your passwords are well-guarded, directories protected, and printouts do not fall into other hands. Parallel Processing Institute(PPI)

WARNING … 不过我的本意并没有提供代码让他抄袭的啊。他有一个binfile 的函数怎么调试都不对,我确实把这段代码发给了他,但我教会了他怎么做的了。… …, 她请教我怎么优化,我跟她讲了优化方法然后她自己去改了,改过以后问我为什么效率没有提升, 我就叫她让我看下她的代码,发现没有实质性的优化,我嫌讲不清就叫她参考我的代码, … … 我们都是“好学生”,在同学之间会很难拒绝。这次之后就没有这种情况发生了。… …, 知道了,只是实在不会写唉,没学c这个指针真的看不太懂额。这次错了,下次一定不会这么做了。不过能不能请老师不要把 XX判为0分 … … XXX没有错,有错的是将他的代码直接交上去的人,他们根本就没考虑一下这可能对XXX造成什么影响。… Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Introduction Installation Shell Pre-requisite Linux Tools

BACKGROUND The History of Linux Linus Torvalds, 1991 Unix-like Operating Systems “ Unix is not so much an operating system as an oral history ” Heirs: Linux, BSD, Solaris, MacOS X, … Linux是在Unix的基础上,Linus把底层的实现都给换掉了,所以和Unix比较接近。Unix的继承者比如,Linux,BSD是伯克利大学开发的,Solaris是太阳公司开发的,不过太阳公司已经被甲骨文收购了。还有Apple的macOS是基于Unix的。 Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Introduction Installation Shell Pre-requisite Linux Tools

INSTALL Step 0: How to find it ? Tips: about version Ubuntu Ubuntu 16.04 Debian Jessie(8.0) INSTALL Step 0: How to find it ? Online: get the official web-site by google Debian (/'dɛbiːjən/, Debra + Ian) http://www.debian.org/distrib/ Ubuntu(/ʊˈbʊntuː/,uu-buun-too) http://cn.ubuntu.com/download/ Parallel Processing Institute(PPI)

INSTALL Step 1: Where to install it ? Cygwin on RAW machine Tips: virtual machine Definition provides a complete system platform which supports the execution of a complete operating system Java Runtime Environment INSTALL Step 1: Where to install it ? Cygwin Sorry, no technical support on RAW machine Cool ! on VIRTUAL machine Safety! Dangerous ! Recommendation ! Parallel Processing Institute(PPI)

INSTALL Step 2: Create VM Select a Guest Operating System (if no ISO) Tips: VMware Workstation Benefit hosted, popular, graphic easy, stable, checkpointed INSTALL Step 2: Create VM Select a Guest Operating System (if no ISO) e.g. Ubuntu 16.04 Set name and location Disk capacity 20G (engross on demand) Network connection (customized) Bridge (separate IP) or NAT (internal IP, default) Done ! Parallel Processing Institute(PPI)

INSTALL Step 3: Configure VM Let’s go ! Insert ISO image “VM -> Settings -> CD-ROM : Use ISO Image” ISO Image: “Ubuntu 16.04-amd64-CD-1.iso” Configure Hardware (Customized) Memory Size #CPU / #Core Ethnet Mode Power On Let’s go ! Parallel Processing Institute(PPI)

APPENDIX: System Virtualization Architecture VM VM Unmodified User Software Unmodified User Software VM VM Unmodified User Software Unmodified User Software Operating System Operating System Operating System Operating System Virtual Machine Monitor Host Operating System Virtual Machine Monitor Hardware (CPU, Memory, Disk, Ethernet) Hardware (CPU, Memory, Disk, Ethernet) Non-hosted Hosted Parallel Processing Institute(PPI)

APPENDIX: System Virtualization Virtual Machine Monitor VMware (EMC) Player, Workstation, … Fusion, VMware Server, ESX Server, … Other s Hyper-V (Virtual PC) xVM (VirtualBox) KVM, Xen … 部分同学的BIOS没有打开CPU的虚拟化。 Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Introduction Installation Shell Pre-requisite Linux Tools Institute of Parallel and Distributed System (iPads), SJTU

SHELL Operating System Shell Provide access to the services of a kernel Command-Line Interface (CLI) Unix Shell e.g. Bounce-Again Shell, bash Non-Unix Shell e.g. DOS Graphical User Interface (GUI) Windows, X Window (KDE, GNOME, Xfce), Mac OS Parallel Processing Institute(PPI)

Commands MOST IMPORTANT Search Path: /bin, /usr/bin, ... Command is case sensitive man – display the on-line manual pages e.g. >man man whatis – search the whatis database for complete words e.g. >whatis passwd Parallel Processing Institute(PPI)

Commands File and Directory ls - list files/dirs e.g. >ls -l mkdir – create a dir e.g. >mkdir test cd - change dir e.g. >cd test rm - remove files/dirs e.g. >rm -f a.txt cp - copy files/dirs e.g. >cp a.txt b.txt mv – move files/dir s e.g. >mv a.txt c.txt pwd – show current path e.g. >pwd du – estimate files/dirs space usage e.g. >du -c -h test df – report free disk space e.g. >df Parallel Processing Institute(PPI)

Commands File and Directory chmod – change mode of file/dir e.g. >chmod 777 test chown – change owner of file/dir e.g. >chown rong edit chgrp – change group of file/dir e.g. >chgrp guest draft -R $ ls -l drwxr--r-- 1 peter admin 4096 Mar 1 2007 drafts -rw-r--r-- 1 peter admin 30405 Mar 1 2007 edition-32 -r-xr-xr-x 1 terry admin 8460 Mar 1 2007 edit duuugggooo C owner group size date name C:(hard link count) Parallel Processing Institute(PPI)

Commands Search whereis - locate special files for a command (binary, src and manual file) e.g. >whereis cp find – search for files/dirs in a dir hierarchy e.g. >find . –name “c.txt” locate – locate files/dirs by name in system based on a database e.g. >locate test grep – text search utility e.g. >grep “abc” . -R Grep 可以用来搜索当前目录包含所有文件所拥有的字符 Parallel Processing Institute(PPI)

Commands User Account useradd – create a new user e.g. >useradd rong userdel – delete a user account e.g. >userdel rong passwd – set password for a user account based on a database e.g. >passwd rong users – print name of user currently logged e.g. >users Parallel Processing Institute(PPI)

Commands Text cat – concatenate and print files e.g. >cat b.txt head – output the first part of files e.g. >head –n 4 b.txt tail – output the last part of files e.g. >tail –c 50 b.txt wc – print the number of newlines, words, and bytes in files e.g. >wc b.txt cut – remove sections from each line of files e.g. >cut –c 4-10 b.txt Wc可以用来统计一个文本的行数,字符数和所占用的字节数 Cut 移除文本的每一行的一段 Parallel Processing Institute(PPI)

Commands Misc echo – display a line of text e.g. >echo $PATH mount – mount a file system e.g. >mount /dev/sda3 /mnt umount – unmount a file system e.g. >umount /mnt ping – send ICMP ECHO_REQUEST to network hosts e.g. >ping 10.132.143.100 date – print or set the system date and time e.g. >date "+%m/%d/%y“ time – time a simple command e.g. >time locate mapreduce Time 使用用过计时器,它输出结果包含三个,一个是实际墙上时间,一个是用户态时间,一个是系统时间。在单线程程序时候,一般这个程序的real 会是用户态+系统时间 但是多线程是不一样的,用户态时间会通过多个核上运行的时间这样就可能会出现用户态时间比其他两个时间都要多的多的。 Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Software Installer Compressing and Archiving Remote Login Text Editor

VERSION CONTROL APT (Advanced Package Tools) A management system for software packages Package resource list for APT: /etc/apt/sources.list $ cat /etc/apt/source.list ... deb http://ftp.sjtu.edu.cn/debian/ squeeze main dbe-src http://ftp.sjtu.edu.cn/debian/ squeeze main type URI of source dist comp URI type: http, ftp, cdrom, file, ssh ... 文件的类型,是deb类型的。有些情况下,没办法通过apt-get安装软件,把下载好的deb包,然后使用dpkg工具进行安装。像Linux要想连接到外网,你首先的登录校园网,要登录校园网,就要使用curl工具,Linux要想通过apt-get安装curl工具又得连接到外网。这个时候就可以 Parallel Processing Institute(PPI)

VERSION CONTROL APT (Advanced Package Tools) apt-get: command-line tool update e.g. >apt-get update install e.g. >apt-get install htop remove e.g. >apt-get remove htop upgrade e.g. >apt-get upgrade htop Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Software Installer Compressing and Archiving Remote Login Text Editor

COMPRESSING GZIP (Gnu ZIP) gzip file format Compress just single file Replace the original file with .gz file e.g. >gzip test.txt >gunzip test.txt.gz Linux中广泛的压缩文件,用于对一个文件进行压缩和解压缩。并且压缩出来的文件会替换掉原始的文件。 Parallel Processing Institute(PPI)

ARCHIVING TAR (Tape ARchive) tar file format Suffix: .tar e.g. >tar -cf src.tar src/ .tgz/.tar.gz e.g. >tar -zxf src.tar.gz .tbz/.tar.bz2 e.g. >tar -jcf src.tbz src/ Tape 磁带 Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Software Installer Compressing and Archiving Remote Login Text Editor

REMOTE LOGIN SSH (Secure SHell) A Replacement for Telnet Communication through a secure channel Tatu Ylönen, 1995 OpenSSH (OpenBSD Secure Shell), 1999 e.g. >ssh root@10.132.143.112 SCP, A Replacement for FTP e.g. >scp b.txt root@10.132.143.112:~/test/ >scp root@10.132.143.112:~/test/b.txt ./ Parallel Processing Institute(PPI)

Pre-requisite Linux Tools Software Installer Compressing and Archiving Remote Login Text Editor

TEXT EDITOR vi (Visual Editor) /'viː'ai/, not /'siks/  Extension: vim, vile, xvi, … Simple and Convenient BOOK: “learning the vi editor” http://www.china-pub.com/computers/common/info.asp?id=9208 Cheat Sheet (Chinese version) http://jserv.sayya.org/misc/vi-vim-cheat-sheet.png “>vimtutor” to get a simple tutorial Parallel Processing Institute(PPI)

TEXT EDITOR Emacs (Editing MACroS) /'imæks/ More powerful than IDE ! Emacs List BOOK: “Learning GNU Emacs” http://www.china-pub.com/computers/common/info.asp?id=13395 Parallel Processing Institute(PPI)

TEXT EDITOR gedit Small text editor in the gnome desktop environment Parallel Processing Institute, Fudan University

Thanks