HKOI 2012 TRAINING INTRO TO LINUX /CUHK/SHB123]$ date Sat Feb 18 13:00:00 HKT 2012.

Slides:



Advertisements
Similar presentations
Linux commands exercise 1. What do you need, if you try to these at home? You need to download and install Ubuntu Linux from the Internet – DVD is need.
Advertisements

By: Tony Andrews.  Linux directory ordering system  Navigating and creating directories ◦ Listing directories and files ◦ Creating directories ◦ Changing.
Unix. Outline Commands Environment Variables Basic Commands CommandMeaning lslist files and directories ls -alist all files and directories mkdirmake.
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.
Exploring the UNIX File System and File Security
Working Environment - - Linux - -.
Linux+ Guide to Linux Certification, Second Edition
Guide To UNIX Using Linux Third Edition
Lecture 01CS311 – Operating Systems 1 1 CS311 – Lecture 01 Outline Course introduction Setting up your system Logging onto the servers at OSU with ssh.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
GETTING STARTED USING LINUX UBUNTU FOR A MULTI-USER SYSTEM Team 4 Lab Coordinator Manager Presentation Prep Webmaster Document Prep Faculty Facilitator.
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.
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”
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Unix Basics Chapter 4.
Dedan Githae, BecA-ILRI Hub Introduction to Linux / UNIX OS MARI eBioKit Workshop; Nov , 2014.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Introduction to Linux ( I ) Sidney Fong 4 th Feb 2006.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
System Administration Introduction to Unix Session 2 – Fri 02 Nov 2007 Reference:  chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN.
Chapter Two Exploring the UNIX File System and File Security.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
UNIX Introduction CSCE 221H Texas A&M University.
House Keeping Section 1 is due on Thursday BEFORE class 18 labs 11 quizzes Log into LabSim I want to verify you are in the Spring 15 CBIS 4225 Sys Admin.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands cal – will print a calendar.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Basic of UNIX For fresh members of SPARCS
Agenda Basic Unix Commands (Chapters 2 & 3) Miscellaneous Commands: which, passwd, date, ps / kill Working with Files: file, touch, cat, more, less, grep,
Week Two Agenda Announcements Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Next lab assignments.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 2a – A Unix Command Sampler (Courtesy of David Notkin, CSE 303)
Linux Commands C151 Multi-User Operating Systems.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop V Files and the File System Part B – File System.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
The Unix File sytem. Introduction Tree structure …
Introduction to UNIX and Linux.  Written by Dennis Ritchie and Ken Thomsom at Bell Labs in 1969  Initially written in assembly language and a high-level.
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.
Learning Unix/Linux Based on slides from: Eric Bishop.
Intro to GNU/Linux See, Stallman? I said GNU. Are you happy now?
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.
CS1010: Intro Workshop.
Getting started with CentOS Linux
Chapter 11 Command-Line Master Class
Linux 101 Training Module Linux Basics.
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
UBUNTU INSTALLATION
Linux/Unix - Download Ubuntu Linux :
C151 Multi-User Operating Systems
Basic knowledge about Linux
The Linux Operating System
Command Line Interface for Beginners
Practice #0: Introduction
Linux.
CSE 374 Programming Concepts & Tools
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Exploring the UNIX File System and File Security
Tutorial of Unix Command & shell scriptS 5027
Getting started with CentOS Linux
Command line.
Short Read Sequencing Analysis Workshop
Presentation transcript:

HKOI 2012 TRAINING INTRO TO LINUX /CUHK/SHB123]$ date Sat Feb 18 13:00:00 HKT 2012

If you are now in Windows now, Please reboot into Linux =)

TODAY CONTENT Part 1 – Hello Linux World Part 2 – Shell & Command Part 3 – Using Linux

PART 1 – HELLO WORLD

LINUX FILE SYSTEM HIERARCHY “Where is my C:\Program Files and D:\ ?” /bin: system.exe (C:\Windows\System32) /boot: kernal image for booting /dev: devices file /etc: configuration files /home: home directory for users (C:\Users) /usr: user program (“Program Files”) /lib,lib64: library (“.dll” in Windows) /sbin: admin.exe (eg. ifconfig) /var: log files

LINUX FILE SYSTEM HIERARCHY “Where is my D:\ ???” Depend on how you “mount” your partition… You can find the devices at /dev/sdx: if your computer can find the device You can access the partition from /media: if the partition is a removable drive /home : if you mount your partition as /home

PART 2 – SHELL & COMMAND

SELF-LEARNING COMMANDS man – reference manuals man cmd: read the manual page of cmd

SELF-LEARNING COMMANDS whatis, whereis whatis cmd: display the man page descriptions of cmd whereis cmd: locate the cmd

BASIC COMMANDS ls - list directory content ls -a: list all file ls -l: long list format

BASIC COMMANDS cd – change directory cd: go to the my home directory cd ~: go to the my home directory cd /: go to the root directory cd dir_name: Enter dir_name cd -: Enter the previous directory cd..: Enter the parent directory

BASIC COMMANDS cp – copy files and directories cp fileA fileB: copy fileA to fileB cp –r dirA dirB: copy dirA to dirB recursively cp *.txt dirA/: copy all.txt file to dirA

BASIC COMMANDS rm – remove files or directories rm fileA: remove fileA rm –r dirA: remove dirA recursively (rmdir) rm *.out: remove all.out files

BASIC COMMANDS mkdir – make directories mkdir dirA: make directory dirA mkdir –p dirA/dirB: make directory dirA/dirB even if the parent directory “dirA” is not exist

BASIC COMMANDS rmdir – remove empty directory mkdir dirA: make directory dirA mkdir –p dirA/dirB: make directory dirA/dirB even if the parent directory “dirA” is not exist

BASIC COMMANDS cat – concatenate files and print cat fileA: print fileA cat fileA fileB: print fileA fileB

BASIC COMMANDS ps – list of current processes ps -e : Get ALL processes ps –U user: Get the user’s processes

BASIC COMMANDS kill – send a signal to a process kill : send a KILL signal to process 12345

BASIC COMMANDS killall – kill all process by name killall a.out: kill all process with name a.out

MORE BASIC COMMANDS man and try them more: view file less: view file (better than more) date: show the system time uptime: tell how long the system has been running top: display Linux task find: find file seq: print sequence of number file: determine the file type head: output the first part of the file tail: output the last part of the file ……

USEFUL COMMANDS IN OI bc – arbitrary PRECISION calculator scale = x: set the number of digits after the decimal point in the expression

USEFUL COMMANDS IN OI bc – arbitrary PRECISION calculator

USEFUL COMMANDS IN OI factor – factorize numbers factor integer in [ 0, 2 64 )

USEFUL COMMANDS IN OI time – run programs and summarize system resource usage

USEFUL COMMANDS IN OI diff – compare files line by line diff fileA fileB: compare fileA and fileB diff –i fileA fileB: ignore case

USEFUL COMMANDS IN OI grep – print matching pattern ps -e | grep “firefox” : find the pattern “firefox” from the output of “ps –e” cat output.txt | grep “debug” : find if the output.txt contain pattern “debug”

USEFUL COMMANDS IN OI sort – sort lines of text files sort -r: reverse the result -n: numeric sort

TEXT EDITOR vim

TEXT EDITOR vim - basic [Esc]-> [normal mode] move cursor only i-> [insert mode] eg. editing ok :-> [command line mode] eg. save file Example: :w-> save file :wq-> save file and quit vim :q-> quit vim (fail if the file is edited) :q!-> quit vim without saving :wq!-> save file and quit vim!

TEXT EDITOR vim - basic /ptn-> search for the pattern “ptn” :123-> go to line 123 dd-> cut the line yy-> copy the line p-> paste u-> undo Ctrl+r-> redo

TEXT EDITOR vim – cheat sheet

TEXT EDITOR vim –.vimrc Locate at the home directory (~/.vimrc) Storing the personal setting of vim Sample :

TEXT EDITOR gedit

TEXT EDITOR gedit - feature nu showmatch ts=4 ……

COMPILER gcc/g++ g++ source.cpp [–o output] [-O2] …

COMPILER gcc/g++ - make Use make to avoid overwriting the source code.

COMPILER fpc – Free Pascal Compiler fpc source.pas –o output./output (Sorry, I have not installed pascal on my Linux)

PART 3 – USING LINUX

CHOOSING DISTRIBUTION Distro Watch :

CHOOSING DISTRIBUTION Linux Mint Beginners Desktop Live Medium

CHOOSING DISTRIBUTION Ubuntu Beginners Desktop Server Live Medium Netbooks

CHOOSING DISTRIBUTION fedora Desktop Server Live Medium

CHOOSING DISTRIBUTION fedora Desktop Server

3 WAYS OF INSTALLING LINUX 1) Format the partition and install 2) Virtualize 1) VirtualBox 2) VMware 3) Wubi – install Linux as a software in Windows

RECOMMENDATION CommandLineFu - Interesting Command