SlideShare a Scribd company logo
http://www.cs.ucr.edu/~weesan/cs183/
Linux Basics
WeeSan Lee <weesan@cs.ucr.edu>
http://www.cs.ucr.edu/~weesan/cs183/
Roadmap
 What is Unix?
 What is Linux?
 Which Linux Distribution is better?
 Fish vs. Fishing
 Basic Commands
 Vi and Emacs
 Q&A
 References
http://www.cs.ucr.edu/~weesan/cs183/
What is Unix?
 A multi-task and multi-user Operating System
 Developed in 1969 at AT&T’s Bell Labs by
 Ken Thompson (Unix)
 Dennis Ritchie (C)
 Douglas Mcllroy (Pipes - Do one thing, do it well)
 Some other variants: System V, Solaris, SCO
Unix, SunOS, 4.4BSD, FreeBSD, NetBSD,
OpenBSD, BSDI
http://www.cs.ucr.edu/~weesan/cs183/
What is Linux?
 A clone of Unix
 Developed in 1991 by Linus Torvalds, a Finnish
graduate student
 Inspired by and replacement of Minix
 Linus' Minix became Linux
 Consist of
 Linux Kernel
 GNU (GNU is Not Unix) Software
 Software Package management
 Others
http://www.linuxdevices.com/files/misc/ibm-watchpad.jpg
http://www.cs.ucr.edu/~weesan/cs183/
What is Linux?
 Originally developed for
32-bit x86-based PC
 Ported to other
architectures, eg.
 Alpha, VAX, PowerPC,
IBM S/390, MIPS, IA-64
 PS2, TiVo, cellphones,
watches, Nokia N810,
NDS, routers, NAS, GPS,
…
* See references at the end
for the corresponding websites.
http://www.cs.ucr.edu/~weesan/cs183/
Which Linux Distribution is better?
 > 300 Linux Distributions
 Slackware (one of the oldest, simple and stable distro.)
 Redhat
 RHEL (commercially support)
 Fedora (free)
 CentOS (free RHEL, based in England)
 SuSe ( based in German)
 Gentoo (Source code based)
 Debian (one of the few called GNU/Linux)
 Ubuntu (based in South Africa)
 Knoppix (first LiveCD distro.)
 …
http://www.cs.ucr.edu/~weesan/cs183/
Which Linux Distribution is better?
Source:
http://futurist.se/gldt/
CentOS
Ubuntu
Knoppix
GentooSlackware
Redhat
Debian
http://www.cs.ucr.edu/~weesan/cs183/
Which Linux Distribution is better?
 Ask yourself these questions (from LAH)
 Is it going to be around in 5 yrs?
 Is it giong to stay on top of the latest security
patches?
 Is it going to release updated software promptly?
 If I have problems, will the vendor talk to me?
 Personally, I use Slackware
 But, we will use CentOS (possibly along with
Slackware :)
http://www.cs.ucr.edu/~weesan/cs183/
Fish vs. Fishing
 Manpage
 $ man ls
 $ man 2 mkdir
 $ man man
 $ man -k mkdir
 Manpage sections (LAH
Table 1.2 @ page 12)
 1 User-level cmds and
apps
 /bin/mkdir
 2 System calls
 int mkdir(const char *, …);
 3 Library calls
 int printf(const char *, …);
 4 Device drivers and
network protocols
 /dev/tty
 5 Standard file formats
 /etc/hosts
 6 Games and demos
 /usr/games/fortune
 7 Misc. files and docs
 man 7 locale
 8 System admin. Cmds
 /sbin/reboot
 $ manpath
 $ env | grep MANPATH
 /etc/man.config
http://www.cs.ucr.edu/~weesan/cs183/
Fish vs. Fishing (cont)
 Google
 linux package management -rpm
 “linux package management” -rpm
 linux OR windows
 rpm site:redhat.com
 linux faq filetype:pdf
 Info
 Text-base, menu-based help from GNU
 ?, h, u, t, ^N, ^P, Enter
 $ info info
http://www.cs.ucr.edu/~weesan/cs183/
Basic Commands
 ls
 $ ls -l
 $ ls -a
 $ ls -la
 $ ls -l --sort=time
 $ ls -l --sort=size -r
 cd
 $ cd /usr/bin
 pwd
 $ pwd
 ~
 $ cd ~
 ~user
 $ cd ~weesan
 What will “cd ~/weesan” do?
 which
 $ which ls
 whereis
 $ whereis ls
 locate
 $ locate stdio.h
 $ locate iostream
 rpm
 $ rpm -q bash
 $ rpm -qa
 $ rpm -qa | sort | less
 find
 $ find / | grep stdio.h
 $ find /usr/include | grep stdio.h
http://www.cs.ucr.edu/~weesan/cs183/
Basic Commands (cont)
 echo
 $ echo “Hello World”
 $ echo -n “Hello World”
 cat
 $ cat /etc/motd
 $ cat /proc/cpuinfo
 cp
 $ cp foo bar
 $ cp -a foo bar
 mv
 $ mv foo bar
 mkdir
 $ mkdir foo
 rm
 $ rm foo
 $ rm -rf foo
 $ rm -i foo
 $ rm -- -foo
 chgrp
 $ chgrp bar /home/foo
 chsh
 $ chsh foo
 chfn
 $ chfn foo
 chown
 $ chown -R foo:bar /home/foo
http://www.cs.ucr.edu/~weesan/cs183/
Basic Commands (cont)
 tar
 $ tar cvfp lab1.tar lab1
 gzip
 $ gzip -9 lab1.tar
 untar & ungzip
 $ gzip -cd lab1.tar.gz | tar xvf –
 $ tar xvfz lab1.tar.gz
 touch
 $ touch foo
 $ cat /dev/null > foo
 Pipe
 $ cal > foo
 $ cat /dev/zero > foo
 $ cat < /etc/passwd
 $ who | cut -d’ ‘ -f1 | sort |
uniq | wc –l
 backtick
 $ echo “The date is `date`”
 $ echo `seq 1 10`
 Hard, soft (symbolic) link
 ln vmlinuz-2.6.24.4 vmlinuz
 ln -s firefox-2.0.0.3 firefox
http://www.cs.ucr.edu/~weesan/cs183/
Basic Commands (cont)
 Disk usage
 $ df -h /
 File space usage
 $ du -sxh ~/
 Advance stuff 
 $ ssh eon who
 $ ssh eon ‘cd .html ; tar cvfp - cs183 | gzip -9c’ | tar
xvfpz -
 $ ssh kilo-1 ‘tar cvfp - /extra/weesan’ | tar xvfp - -C /
http://www.cs.ucr.edu/~weesan/cs183/
Vi
 2 modes
 Input mode
 ESC to back to cmd mode
 Command mode
 Cursor movement
 h (left), j (down), k (up), l (right)
 ^f (page down)
 ^b (page up)
 ^ (first char.)
 $ (last char.)
 G (bottom page)
 :1 (goto first line)
 Swtch to input mode
 a (append)
 i (insert)
 o (insert line after
 O (insert line before)
 Delete
 dd (delete a line)
 d10d (delete 10 lines)
 d$ (delete till end of line)
 dG (delete till end of file)
 x (current char.)
 Paste
 p (paste after)
 P (paste before)
 Undo
 u
 Search
 /
 Save/Quit
 :w (write)
 :q (quit)
 :wq (write and quit)
 :q! (give up changes)
http://www.cs.ucr.edu/~weesan/cs183/
Emacs
 $ emacs
 Cursor movement
 ^f (forward one char.)
 ^b (backward one char.)
 ^a (begin of line)
 ^e (end of line)
 ^n (next line)
 ^p (prev. line)
 ^v (page up)
 alt-v (page down)
 Deletion
 ^d (delete one char)
 alt-d (delete one word)
 ^k (delete line)
 Paste
 ^y (yank)
 Undo
 ^/
 Load file
 ^x^f
 Cancel
 ^g
 Save/Quit
 ^x^c (quit w/out saving)
 ^x^s (save)
 ^x^w (write to a new file)
http://www.cs.ucr.edu/~weesan/cs183/
Q&A
http://www.cs.ucr.edu/~weesan/cs183/
References
 LAH
 Ch 1: Where to Start
 Unix history
 http://en.wikipedia.org/wiki/Unix
 http://upload.wikimedia.org/wikipedia/commons/7/77/Unix_histor
 Linus Torvalds
 http://en.wikipedia.org/wiki/Linus_Torvalds
 Linux Kernel
 http://www.kernel.org/
http://www.cs.ucr.edu/~weesan/cs183/
References
 GNU (Gnu’s Not Unix)
 http://www.gnu.org/
 Linux Distribution
 http://en.wikipedia.org/wiki/Linux_distribution
 http://en.wikipedia.org/wiki/List_of_Linux_distributions
 PS2: Computational Cluster
 http://arrakis.ncsa.uiuc.edu/ps2/cluster.php
 Linux Gadgets
 http://linuxdevices.com/articles/AT4936596231.html
 TiVo
 http://dynamic.tivo.com/linux/linux.asp
http://www.cs.ucr.edu/~weesan/cs183/
References
 Nintendo DS Lite
 http://www.nintendo.com/ds/
 Nokia N810
 http://www.nokia.com/
 http://www.engadget.com/2007/10/17/nokia-n810-gets-official/
 Linux Distribution
 http://en.wikipedia.org/wiki/Linux_distribution
 GNU/Linux Distro Timeline: http://futurist.se/gldt/
 http://www.distrowatch.com/
 http://www.linux.org/dist/
 Google Advance Search
 http://www.google.com/intl/en/help/refinesearch.html

More Related Content

What's hot

Unix Programming with Perl 2
Unix Programming with Perl 2Unix Programming with Perl 2
Unix Programming with Perl 2
Kazuho Oku
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting BasicsSudharsan S
 
Popstat1 sh
Popstat1 shPopstat1 sh
Popstat1 sh
Ben Pope
 
Scripting 101
Scripting 101Scripting 101
Scripting 101
ohardebol
 
Introduction to shell scripting
Introduction to shell scriptingIntroduction to shell scripting
Introduction to shell scripting
Corrado Santoro
 
Zsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackersZsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackers
Ruslan Sharipov
 
DevChatt 2010 - *nix Cmd Line Kung Foo
DevChatt 2010 - *nix Cmd Line Kung FooDevChatt 2010 - *nix Cmd Line Kung Foo
DevChatt 2010 - *nix Cmd Line Kung Foobrian_dailey
 
Bash 4
Bash 4Bash 4
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting BasicsDr.Ravi
 
Comets notes
Comets notesComets notes
Comets notes
Ilija Dukovski
 
File-I/O -- ist doch ganz einfach, oder?
File-I/O -- ist doch ganz einfach, oder?File-I/O -- ist doch ganz einfach, oder?
File-I/O -- ist doch ganz einfach, oder?
Christian Kauhaus
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
Neoito
 
TDDBC お題
TDDBC お題TDDBC お題
TDDBC お題
Takuto Wada
 
Crystal Rocks
Crystal RocksCrystal Rocks
Crystal Rocks
Brian Cardiff
 
bash
bashbash
Gdc09 Minimissile
Gdc09 MinimissileGdc09 Minimissile
Gdc09 MinimissileSusan Gold
 
Mkscript sh
Mkscript shMkscript sh
Mkscript sh
Ben Pope
 
Unix Basics
Unix BasicsUnix Basics
Unix BasicsDr.Ravi
 
Linux basics by Raj Miraje
Linux basics by Raj MirajeLinux basics by Raj Miraje
Linux basics by Raj Miraje
Raj Mirje
 

What's hot (20)

Unix Programming with Perl 2
Unix Programming with Perl 2Unix Programming with Perl 2
Unix Programming with Perl 2
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
 
Unix 5 en
Unix 5 enUnix 5 en
Unix 5 en
 
Popstat1 sh
Popstat1 shPopstat1 sh
Popstat1 sh
 
Scripting 101
Scripting 101Scripting 101
Scripting 101
 
Introduction to shell scripting
Introduction to shell scriptingIntroduction to shell scripting
Introduction to shell scripting
 
Zsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackersZsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackers
 
DevChatt 2010 - *nix Cmd Line Kung Foo
DevChatt 2010 - *nix Cmd Line Kung FooDevChatt 2010 - *nix Cmd Line Kung Foo
DevChatt 2010 - *nix Cmd Line Kung Foo
 
Bash 4
Bash 4Bash 4
Bash 4
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
 
Comets notes
Comets notesComets notes
Comets notes
 
File-I/O -- ist doch ganz einfach, oder?
File-I/O -- ist doch ganz einfach, oder?File-I/O -- ist doch ganz einfach, oder?
File-I/O -- ist doch ganz einfach, oder?
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
 
TDDBC お題
TDDBC お題TDDBC お題
TDDBC お題
 
Crystal Rocks
Crystal RocksCrystal Rocks
Crystal Rocks
 
bash
bashbash
bash
 
Gdc09 Minimissile
Gdc09 MinimissileGdc09 Minimissile
Gdc09 Minimissile
 
Mkscript sh
Mkscript shMkscript sh
Mkscript sh
 
Unix Basics
Unix BasicsUnix Basics
Unix Basics
 
Linux basics by Raj Miraje
Linux basics by Raj MirajeLinux basics by Raj Miraje
Linux basics by Raj Miraje
 

Similar to 10.8.2018

Linux history & features
Linux history & featuresLinux history & features
Linux history & featuresRohit Kumar
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformatics
Bonnie Ng
 
Linux powerpoint
Linux powerpointLinux powerpoint
Linux powerpoint
bijanshr
 
Introduction to-linux
Introduction to-linuxIntroduction to-linux
Introduction to-linux
kishore1986
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Geeks Anonymes
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basicsAbhay Sapru
 
UNIX Basics and Cluster Computing
UNIX Basics and Cluster ComputingUNIX Basics and Cluster Computing
UNIX Basics and Cluster Computing
Bioinformatics and Computational Biosciences Branch
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
Kenneth Geisshirt
 
Linuxppt
LinuxpptLinuxppt
LinuxpptReka
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
Introduction-to-Linux.pptx
Introduction-to-Linux.pptxIntroduction-to-Linux.pptx
Introduction-to-Linux.pptx
SharanShrinivasan1
 
Introduction to-linux
Introduction to-linuxIntroduction to-linux
Introduction to-linux
rowiebornia
 
Introduction-to-Linux.pptx
Introduction-to-Linux.pptxIntroduction-to-Linux.pptx
Introduction-to-Linux.pptx
DavidMaina47
 
Introduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkiiIntroduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkii
cmdept1
 
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
Kenneth Geisshirt
 

Similar to 10.8.2018 (20)

Linux history & features
Linux history & featuresLinux history & features
Linux history & features
 
Basic linux commands for bioinformatics
Basic linux commands for bioinformaticsBasic linux commands for bioinformatics
Basic linux commands for bioinformatics
 
Linux powerpoint
Linux powerpointLinux powerpoint
Linux powerpoint
 
Introduction to-linux
Introduction to-linuxIntroduction to-linux
Introduction to-linux
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basics
 
UNIX Basics and Cluster Computing
UNIX Basics and Cluster ComputingUNIX Basics and Cluster Computing
UNIX Basics and Cluster Computing
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
 
Introduction-to-Linux.pptx
Introduction-to-Linux.pptxIntroduction-to-Linux.pptx
Introduction-to-Linux.pptx
 
Introduction to-linux
Introduction to-linuxIntroduction to-linux
Introduction to-linux
 
Introduction-to-Linux.pptx
Introduction-to-Linux.pptxIntroduction-to-Linux.pptx
Introduction-to-Linux.pptx
 
Introduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkiiIntroduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkii
 
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
 
Unleash your inner console cowboy
Unleash your inner console cowboyUnleash your inner console cowboy
Unleash your inner console cowboy
 

More from Rajes Wari

Object-Oriented Programming C++inheritance types of inheritanceexampple progr...
Object-Oriented Programming C++inheritance types of inheritanceexampple progr...Object-Oriented Programming C++inheritance types of inheritanceexampple progr...
Object-Oriented Programming C++inheritance types of inheritanceexampple progr...
Rajes Wari
 
c++ INTRODUCTION SOFTWARE CROISIS TYPES OF PRO
c++ INTRODUCTION SOFTWARE CROISIS TYPES OF PROc++ INTRODUCTION SOFTWARE CROISIS TYPES OF PRO
c++ INTRODUCTION SOFTWARE CROISIS TYPES OF PRO
Rajes Wari
 
12.7.2018
12.7.201812.7.2018
12.7.2018
Rajes Wari
 
11.3.14&amp;22.1.16
11.3.14&amp;22.1.1611.3.14&amp;22.1.16
11.3.14&amp;22.1.16
Rajes Wari
 
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.154.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
Rajes Wari
 
25.2.14
25.2.1425.2.14
25.2.14
Rajes Wari
 
18.2.14
18.2.1418.2.14
18.2.14
Rajes Wari
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
Rajes Wari
 

More from Rajes Wari (8)

Object-Oriented Programming C++inheritance types of inheritanceexampple progr...
Object-Oriented Programming C++inheritance types of inheritanceexampple progr...Object-Oriented Programming C++inheritance types of inheritanceexampple progr...
Object-Oriented Programming C++inheritance types of inheritanceexampple progr...
 
c++ INTRODUCTION SOFTWARE CROISIS TYPES OF PRO
c++ INTRODUCTION SOFTWARE CROISIS TYPES OF PROc++ INTRODUCTION SOFTWARE CROISIS TYPES OF PRO
c++ INTRODUCTION SOFTWARE CROISIS TYPES OF PRO
 
12.7.2018
12.7.201812.7.2018
12.7.2018
 
11.3.14&amp;22.1.16
11.3.14&amp;22.1.1611.3.14&amp;22.1.16
11.3.14&amp;22.1.16
 
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.154.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
 
25.2.14
25.2.1425.2.14
25.2.14
 
18.2.14
18.2.1418.2.14
18.2.14
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 

Recently uploaded

Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 

Recently uploaded (20)

Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 

10.8.2018

  • 2. http://www.cs.ucr.edu/~weesan/cs183/ Roadmap  What is Unix?  What is Linux?  Which Linux Distribution is better?  Fish vs. Fishing  Basic Commands  Vi and Emacs  Q&A  References
  • 3. http://www.cs.ucr.edu/~weesan/cs183/ What is Unix?  A multi-task and multi-user Operating System  Developed in 1969 at AT&T’s Bell Labs by  Ken Thompson (Unix)  Dennis Ritchie (C)  Douglas Mcllroy (Pipes - Do one thing, do it well)  Some other variants: System V, Solaris, SCO Unix, SunOS, 4.4BSD, FreeBSD, NetBSD, OpenBSD, BSDI
  • 4. http://www.cs.ucr.edu/~weesan/cs183/ What is Linux?  A clone of Unix  Developed in 1991 by Linus Torvalds, a Finnish graduate student  Inspired by and replacement of Minix  Linus' Minix became Linux  Consist of  Linux Kernel  GNU (GNU is Not Unix) Software  Software Package management  Others http://www.linuxdevices.com/files/misc/ibm-watchpad.jpg
  • 5. http://www.cs.ucr.edu/~weesan/cs183/ What is Linux?  Originally developed for 32-bit x86-based PC  Ported to other architectures, eg.  Alpha, VAX, PowerPC, IBM S/390, MIPS, IA-64  PS2, TiVo, cellphones, watches, Nokia N810, NDS, routers, NAS, GPS, … * See references at the end for the corresponding websites.
  • 6. http://www.cs.ucr.edu/~weesan/cs183/ Which Linux Distribution is better?  > 300 Linux Distributions  Slackware (one of the oldest, simple and stable distro.)  Redhat  RHEL (commercially support)  Fedora (free)  CentOS (free RHEL, based in England)  SuSe ( based in German)  Gentoo (Source code based)  Debian (one of the few called GNU/Linux)  Ubuntu (based in South Africa)  Knoppix (first LiveCD distro.)  …
  • 7. http://www.cs.ucr.edu/~weesan/cs183/ Which Linux Distribution is better? Source: http://futurist.se/gldt/ CentOS Ubuntu Knoppix GentooSlackware Redhat Debian
  • 8. http://www.cs.ucr.edu/~weesan/cs183/ Which Linux Distribution is better?  Ask yourself these questions (from LAH)  Is it going to be around in 5 yrs?  Is it giong to stay on top of the latest security patches?  Is it going to release updated software promptly?  If I have problems, will the vendor talk to me?  Personally, I use Slackware  But, we will use CentOS (possibly along with Slackware :)
  • 9. http://www.cs.ucr.edu/~weesan/cs183/ Fish vs. Fishing  Manpage  $ man ls  $ man 2 mkdir  $ man man  $ man -k mkdir  Manpage sections (LAH Table 1.2 @ page 12)  1 User-level cmds and apps  /bin/mkdir  2 System calls  int mkdir(const char *, …);  3 Library calls  int printf(const char *, …);  4 Device drivers and network protocols  /dev/tty  5 Standard file formats  /etc/hosts  6 Games and demos  /usr/games/fortune  7 Misc. files and docs  man 7 locale  8 System admin. Cmds  /sbin/reboot  $ manpath  $ env | grep MANPATH  /etc/man.config
  • 10. http://www.cs.ucr.edu/~weesan/cs183/ Fish vs. Fishing (cont)  Google  linux package management -rpm  “linux package management” -rpm  linux OR windows  rpm site:redhat.com  linux faq filetype:pdf  Info  Text-base, menu-based help from GNU  ?, h, u, t, ^N, ^P, Enter  $ info info
  • 11. http://www.cs.ucr.edu/~weesan/cs183/ Basic Commands  ls  $ ls -l  $ ls -a  $ ls -la  $ ls -l --sort=time  $ ls -l --sort=size -r  cd  $ cd /usr/bin  pwd  $ pwd  ~  $ cd ~  ~user  $ cd ~weesan  What will “cd ~/weesan” do?  which  $ which ls  whereis  $ whereis ls  locate  $ locate stdio.h  $ locate iostream  rpm  $ rpm -q bash  $ rpm -qa  $ rpm -qa | sort | less  find  $ find / | grep stdio.h  $ find /usr/include | grep stdio.h
  • 12. http://www.cs.ucr.edu/~weesan/cs183/ Basic Commands (cont)  echo  $ echo “Hello World”  $ echo -n “Hello World”  cat  $ cat /etc/motd  $ cat /proc/cpuinfo  cp  $ cp foo bar  $ cp -a foo bar  mv  $ mv foo bar  mkdir  $ mkdir foo  rm  $ rm foo  $ rm -rf foo  $ rm -i foo  $ rm -- -foo  chgrp  $ chgrp bar /home/foo  chsh  $ chsh foo  chfn  $ chfn foo  chown  $ chown -R foo:bar /home/foo
  • 13. http://www.cs.ucr.edu/~weesan/cs183/ Basic Commands (cont)  tar  $ tar cvfp lab1.tar lab1  gzip  $ gzip -9 lab1.tar  untar & ungzip  $ gzip -cd lab1.tar.gz | tar xvf –  $ tar xvfz lab1.tar.gz  touch  $ touch foo  $ cat /dev/null > foo  Pipe  $ cal > foo  $ cat /dev/zero > foo  $ cat < /etc/passwd  $ who | cut -d’ ‘ -f1 | sort | uniq | wc –l  backtick  $ echo “The date is `date`”  $ echo `seq 1 10`  Hard, soft (symbolic) link  ln vmlinuz-2.6.24.4 vmlinuz  ln -s firefox-2.0.0.3 firefox
  • 14. http://www.cs.ucr.edu/~weesan/cs183/ Basic Commands (cont)  Disk usage  $ df -h /  File space usage  $ du -sxh ~/  Advance stuff   $ ssh eon who  $ ssh eon ‘cd .html ; tar cvfp - cs183 | gzip -9c’ | tar xvfpz -  $ ssh kilo-1 ‘tar cvfp - /extra/weesan’ | tar xvfp - -C /
  • 15. http://www.cs.ucr.edu/~weesan/cs183/ Vi  2 modes  Input mode  ESC to back to cmd mode  Command mode  Cursor movement  h (left), j (down), k (up), l (right)  ^f (page down)  ^b (page up)  ^ (first char.)  $ (last char.)  G (bottom page)  :1 (goto first line)  Swtch to input mode  a (append)  i (insert)  o (insert line after  O (insert line before)  Delete  dd (delete a line)  d10d (delete 10 lines)  d$ (delete till end of line)  dG (delete till end of file)  x (current char.)  Paste  p (paste after)  P (paste before)  Undo  u  Search  /  Save/Quit  :w (write)  :q (quit)  :wq (write and quit)  :q! (give up changes)
  • 16. http://www.cs.ucr.edu/~weesan/cs183/ Emacs  $ emacs  Cursor movement  ^f (forward one char.)  ^b (backward one char.)  ^a (begin of line)  ^e (end of line)  ^n (next line)  ^p (prev. line)  ^v (page up)  alt-v (page down)  Deletion  ^d (delete one char)  alt-d (delete one word)  ^k (delete line)  Paste  ^y (yank)  Undo  ^/  Load file  ^x^f  Cancel  ^g  Save/Quit  ^x^c (quit w/out saving)  ^x^s (save)  ^x^w (write to a new file)
  • 18. http://www.cs.ucr.edu/~weesan/cs183/ References  LAH  Ch 1: Where to Start  Unix history  http://en.wikipedia.org/wiki/Unix  http://upload.wikimedia.org/wikipedia/commons/7/77/Unix_histor  Linus Torvalds  http://en.wikipedia.org/wiki/Linus_Torvalds  Linux Kernel  http://www.kernel.org/
  • 19. http://www.cs.ucr.edu/~weesan/cs183/ References  GNU (Gnu’s Not Unix)  http://www.gnu.org/  Linux Distribution  http://en.wikipedia.org/wiki/Linux_distribution  http://en.wikipedia.org/wiki/List_of_Linux_distributions  PS2: Computational Cluster  http://arrakis.ncsa.uiuc.edu/ps2/cluster.php  Linux Gadgets  http://linuxdevices.com/articles/AT4936596231.html  TiVo  http://dynamic.tivo.com/linux/linux.asp
  • 20. http://www.cs.ucr.edu/~weesan/cs183/ References  Nintendo DS Lite  http://www.nintendo.com/ds/  Nokia N810  http://www.nokia.com/  http://www.engadget.com/2007/10/17/nokia-n810-gets-official/  Linux Distribution  http://en.wikipedia.org/wiki/Linux_distribution  GNU/Linux Distro Timeline: http://futurist.se/gldt/  http://www.distrowatch.com/  http://www.linux.org/dist/  Google Advance Search  http://www.google.com/intl/en/help/refinesearch.html