SlideShare une entreprise Scribd logo
1  sur  70
Télécharger pour lire hors ligne
HOW DO I UNIX ?
DEREK GRAHAM
UNIX
PROJECT GOALS
▸ performance
▸ reliability
▸ multi-user
▸ security
▸ admin abilities
▸ ordinary user abilities
▸ “portable”
TEXT
SO FROM NOW ON…
LINUX == UNIX
SO WHAT ACTUALLY IS AN OPERATING SYSTEM?
AN OPERATING SYSTEM IS…
SO WHAT ACTUALLY IS AN OPERATING SYSTEM?
AN OPERATING SYSTEM IS…
▸ the invisible software that tells the hardware what to do
▸ understands keyboard and mouse
▸ draws on the screen
▸ reads and writes to disk
▸ reads and write to network
▸ decides which program runs when
▸ decides how programs work together
SO WHAT ACTUALLY IS AN OPERATING SYSTEM?
IT ISN’T…
▸ anything you can see
▸ anything you can touch
▸ a command line
▸ the windows on your screen
QUIZ TIME
WHICH THINGS ARE UNIX?
WHERE IS UNIX
MAJORITY OF WEB SERVERS
▸ Amazon
▸ Flickr
▸ Paypal
▸ Wikipedia
▸ Facebook
▸ Youtube
DISTROS
DESKTOP AND LAPTOP UNIX
▸ Ubuntu
▸ Fedora
▸ Debian (& Raspbian)
▸ Mint
▸ Elementary
▸ BSD
TEXT
GETTING THINGS DONE
GUIS ARE ALL THE SAME
▸ Web browser
▸ Email
▸ All the “normal” applications
▸ Personal preference
GETTING THINGS DONE
WHERE UNIX SHINES…
▸ command line tools
▸ shell scripting
▸ compose simple programs together to make complicated
ones
GETTING THINGS DONE
COMMAND LINE PHILOSOPHY
▸ A program should do one thing and do it well
▸ A program’s output will be the input to another program
▸ A program should use text streams for input and output
▸ Text is the universal interface
▸ Don’t clutter output with extra information
GETTING THINGS DONE
GOTCHAS
▸ case is important
▸ windows paths use 
▸ unix paths use /
▸ why do web addresses use / ?
▸ commands can be difficult to remember
▸ arguments can be worse!
GETTING THINGS DONE
MOVING AROUND
▸ where am i ? - pwd
▸ change directory - cd
▸ what’s in this directory ? ls
GETTING THINGS DONE
FILES
▸ print a file to screen - cat <filename>
▸ copy file - cp <from> <to>
▸ move file - mv <from> <to>
▸ find a file - find . -name “*.txt”
▸ search inside files - grep ‘hello’ *.txt
▸ manipulate text - sed
GETTING THINGS DONE
DIRECTORIES
▸ create a directory - mkdir <directory>
▸ delete empty directory - rmdir <directory>
▸ permanently delete !!! - rm <file or directory>
▸ there is no recycle bin !!!
GETTING THINGS DONE
DOWNLOAD A FILE
▸ wget http://mywebsite.com/mypicture.jpg
GETTING THINGS DONE
REDIRECTING WITH < > AND I
▸ chain simple utilities together in interesting ways
▸ stdin is the command line
▸ stdout is the screen
▸ ls . stdin is . stdout is the screen
▸ ls . > list.txt stdout is now a file
▸ ls -l | grep hello stdout goes to input of grep
▸ very fast - unix handles plumbing between programs
GETTING THINGS DONE
SEARCH FOR FILES
▸ ls lists files
▸ grep searches text and prints results
▸ sort orders the results
▸ ls -l | grep hello | sort -r
GETTING THINGS DONE
HOW MANY TIMES DOES A WORD APPEAR IN A FILE?
▸ wget https://www.gutenberg.org/files/102/102-0.txt
▸ cat 102-0.txt | grep -c Wilson
GETTING THINGS DONE
WHAT IS THE MOST POPULAR WORD IN A BOOK?
▸ cat 102-0.txt | (type out the content of the file )
▸ tr -cs A-Za-z 'n' | (put each word on a new line)
▸ tr A-Z a-z | (convert everything to lower case)
▸ sort | (sort alphabetically)
▸ uniq -c | (remove duplicates but count how many there were)
▸ sort -rn (sort in descending order)
▸ head -n 1 (take the first item from the list)
GETTING THINGS DONE
SECURITY AND SUDO
▸ Files are not executable by default
▸ Unix has a lot of power if you need it
▸ Users do not have super powers
▸ You need to be an admin to use super powers
▸ Super User DO
GETTING THINGS DONE
HELP !!!!!
▸ Man pages are your friend !
▸ man ls
▸ man pwd
▸ q to quit
PRACTICE
RASPBERRY PI
TEXT
PRACTICE
QUESTIONS?

Contenu connexe

Similaire à How Do I Unix

About linux-english
About linux-englishAbout linux-english
About linux-englishShota Ito
 
Linux: A Getting Started Presentation
Linux: A Getting Started PresentationLinux: A Getting Started Presentation
Linux: A Getting Started PresentationNap Ramirez
 
Code4vn linux day1 operating system concept
Code4vn linux day1 operating system conceptCode4vn linux day1 operating system concept
Code4vn linux day1 operating system conceptCường Nguyễn
 
Get the most out of your Mac OS X
Get the most out of your Mac OS XGet the most out of your Mac OS X
Get the most out of your Mac OS XJanne Warén
 
Developer-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing oneDeveloper-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing oneSylvain Zimmer
 
Developer-friendly task queues: what we learned building MRQ, Sylvain Zimmer
Developer-friendly task queues: what we learned building MRQ, Sylvain ZimmerDeveloper-friendly task queues: what we learned building MRQ, Sylvain Zimmer
Developer-friendly task queues: what we learned building MRQ, Sylvain ZimmerPôle Systematic Paris-Region
 
Introduction to-linux
Introduction to-linuxIntroduction to-linux
Introduction to-linuxkishore1986
 
Introduction to-linux
Introduction to-linuxIntroduction to-linux
Introduction to-linuxrowiebornia
 
Introduction-to-Linux.pptx
Introduction-to-Linux.pptxIntroduction-to-Linux.pptx
Introduction-to-Linux.pptxDavidMaina47
 
Introduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkiiIntroduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkiicmdept1
 
About linux japanese
About linux japaneseAbout linux japanese
About linux japaneseShota Ito
 
Docker security 101 (CfgMgmtCamp 2019)
Docker security 101 (CfgMgmtCamp 2019)Docker security 101 (CfgMgmtCamp 2019)
Docker security 101 (CfgMgmtCamp 2019)Frank Louwers
 
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토itsming
 

Similaire à How Do I Unix (20)

unix_commands.ppt
unix_commands.pptunix_commands.ppt
unix_commands.ppt
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
About linux-english
About linux-englishAbout linux-english
About linux-english
 
Linux: A Getting Started Presentation
Linux: A Getting Started PresentationLinux: A Getting Started Presentation
Linux: A Getting Started Presentation
 
Code4vn linux day1 operating system concept
Code4vn linux day1 operating system conceptCode4vn linux day1 operating system concept
Code4vn linux day1 operating system concept
 
Get the most out of your Mac OS X
Get the most out of your Mac OS XGet the most out of your Mac OS X
Get the most out of your Mac OS X
 
Linux Commands.pptx
Linux Commands.pptxLinux Commands.pptx
Linux Commands.pptx
 
Developer-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing oneDeveloper-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing one
 
Developer-friendly task queues: what we learned building MRQ, Sylvain Zimmer
Developer-friendly task queues: what we learned building MRQ, Sylvain ZimmerDeveloper-friendly task queues: what we learned building MRQ, Sylvain Zimmer
Developer-friendly task queues: what we learned building MRQ, Sylvain Zimmer
 
Intro to DevOps
Intro to DevOpsIntro to DevOps
Intro to DevOps
 
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 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
 
About linux japanese
About linux japaneseAbout linux japanese
About linux japanese
 
Docker security 101 (CfgMgmtCamp 2019)
Docker security 101 (CfgMgmtCamp 2019)Docker security 101 (CfgMgmtCamp 2019)
Docker security 101 (CfgMgmtCamp 2019)
 
Linux Fundamentals
Linux FundamentalsLinux Fundamentals
Linux Fundamentals
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
 

Plus de Derek Graham

Testing at Both Ends of the Triangle.
Testing at Both Ends of the Triangle.Testing at Both Ends of the Triangle.
Testing at Both Ends of the Triangle.Derek Graham
 
Testing at Both Ends of the Triangle
Testing at Both Ends of the TriangleTesting at Both Ends of the Triangle
Testing at Both Ends of the TriangleDerek Graham
 
The Elements of Style
The Elements of StyleThe Elements of Style
The Elements of StyleDerek Graham
 
The Elements of Style
The Elements of StyleThe Elements of Style
The Elements of StyleDerek Graham
 
Married to the Mob (programming)
Married to the Mob (programming)Married to the Mob (programming)
Married to the Mob (programming)Derek Graham
 
physical computing
physical computingphysical computing
physical computingDerek Graham
 
Married to the Mob (programming)
Married to the Mob (programming)Married to the Mob (programming)
Married to the Mob (programming)Derek Graham
 
Adventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE BytesAdventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE BytesDerek Graham
 
Sketchnotes from DDD North 2015
Sketchnotes from DDD North 2015Sketchnotes from DDD North 2015
Sketchnotes from DDD North 2015Derek Graham
 
Sketchnoting for Developers at DDD North 2015
Sketchnoting for Developers at DDD North 2015Sketchnoting for Developers at DDD North 2015
Sketchnoting for Developers at DDD North 2015Derek Graham
 

Plus de Derek Graham (12)

Testing at Both Ends of the Triangle.
Testing at Both Ends of the Triangle.Testing at Both Ends of the Triangle.
Testing at Both Ends of the Triangle.
 
Testing at Both Ends of the Triangle
Testing at Both Ends of the TriangleTesting at Both Ends of the Triangle
Testing at Both Ends of the Triangle
 
How to be Psychic
How to be PsychicHow to be Psychic
How to be Psychic
 
no SOLID evidence
no SOLID evidenceno SOLID evidence
no SOLID evidence
 
The Elements of Style
The Elements of StyleThe Elements of Style
The Elements of Style
 
The Elements of Style
The Elements of StyleThe Elements of Style
The Elements of Style
 
Married to the Mob (programming)
Married to the Mob (programming)Married to the Mob (programming)
Married to the Mob (programming)
 
physical computing
physical computingphysical computing
physical computing
 
Married to the Mob (programming)
Married to the Mob (programming)Married to the Mob (programming)
Married to the Mob (programming)
 
Adventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE BytesAdventures in Azure Machine Learning from NE Bytes
Adventures in Azure Machine Learning from NE Bytes
 
Sketchnotes from DDD North 2015
Sketchnotes from DDD North 2015Sketchnotes from DDD North 2015
Sketchnotes from DDD North 2015
 
Sketchnoting for Developers at DDD North 2015
Sketchnoting for Developers at DDD North 2015Sketchnoting for Developers at DDD North 2015
Sketchnoting for Developers at DDD North 2015
 

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

How Do I Unix

  • 1. HOW DO I UNIX ? DEREK GRAHAM
  • 2.
  • 3.
  • 4. UNIX PROJECT GOALS ▸ performance ▸ reliability ▸ multi-user ▸ security ▸ admin abilities ▸ ordinary user abilities ▸ “portable”
  • 5.
  • 6.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. SO FROM NOW ON… LINUX == UNIX
  • 13. SO WHAT ACTUALLY IS AN OPERATING SYSTEM? AN OPERATING SYSTEM IS…
  • 14. SO WHAT ACTUALLY IS AN OPERATING SYSTEM? AN OPERATING SYSTEM IS… ▸ the invisible software that tells the hardware what to do ▸ understands keyboard and mouse ▸ draws on the screen ▸ reads and writes to disk ▸ reads and write to network ▸ decides which program runs when ▸ decides how programs work together
  • 15. SO WHAT ACTUALLY IS AN OPERATING SYSTEM? IT ISN’T… ▸ anything you can see ▸ anything you can touch ▸ a command line ▸ the windows on your screen
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. WHERE IS UNIX MAJORITY OF WEB SERVERS ▸ Amazon ▸ Flickr ▸ Paypal ▸ Wikipedia ▸ Facebook ▸ Youtube
  • 43.
  • 44. DISTROS DESKTOP AND LAPTOP UNIX ▸ Ubuntu ▸ Fedora ▸ Debian (& Raspbian) ▸ Mint ▸ Elementary ▸ BSD
  • 45. TEXT
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. GETTING THINGS DONE GUIS ARE ALL THE SAME ▸ Web browser ▸ Email ▸ All the “normal” applications ▸ Personal preference
  • 51. GETTING THINGS DONE WHERE UNIX SHINES… ▸ command line tools ▸ shell scripting ▸ compose simple programs together to make complicated ones
  • 52. GETTING THINGS DONE COMMAND LINE PHILOSOPHY ▸ A program should do one thing and do it well ▸ A program’s output will be the input to another program ▸ A program should use text streams for input and output ▸ Text is the universal interface ▸ Don’t clutter output with extra information
  • 53. GETTING THINGS DONE GOTCHAS ▸ case is important ▸ windows paths use ▸ unix paths use / ▸ why do web addresses use / ? ▸ commands can be difficult to remember ▸ arguments can be worse!
  • 54.
  • 55. GETTING THINGS DONE MOVING AROUND ▸ where am i ? - pwd ▸ change directory - cd ▸ what’s in this directory ? ls
  • 56. GETTING THINGS DONE FILES ▸ print a file to screen - cat <filename> ▸ copy file - cp <from> <to> ▸ move file - mv <from> <to> ▸ find a file - find . -name “*.txt” ▸ search inside files - grep ‘hello’ *.txt ▸ manipulate text - sed
  • 57. GETTING THINGS DONE DIRECTORIES ▸ create a directory - mkdir <directory> ▸ delete empty directory - rmdir <directory> ▸ permanently delete !!! - rm <file or directory> ▸ there is no recycle bin !!!
  • 58. GETTING THINGS DONE DOWNLOAD A FILE ▸ wget http://mywebsite.com/mypicture.jpg
  • 59. GETTING THINGS DONE REDIRECTING WITH < > AND I ▸ chain simple utilities together in interesting ways ▸ stdin is the command line ▸ stdout is the screen ▸ ls . stdin is . stdout is the screen ▸ ls . > list.txt stdout is now a file ▸ ls -l | grep hello stdout goes to input of grep ▸ very fast - unix handles plumbing between programs
  • 60. GETTING THINGS DONE SEARCH FOR FILES ▸ ls lists files ▸ grep searches text and prints results ▸ sort orders the results ▸ ls -l | grep hello | sort -r
  • 61. GETTING THINGS DONE HOW MANY TIMES DOES A WORD APPEAR IN A FILE? ▸ wget https://www.gutenberg.org/files/102/102-0.txt ▸ cat 102-0.txt | grep -c Wilson
  • 62. GETTING THINGS DONE WHAT IS THE MOST POPULAR WORD IN A BOOK? ▸ cat 102-0.txt | (type out the content of the file ) ▸ tr -cs A-Za-z 'n' | (put each word on a new line) ▸ tr A-Z a-z | (convert everything to lower case) ▸ sort | (sort alphabetically) ▸ uniq -c | (remove duplicates but count how many there were) ▸ sort -rn (sort in descending order) ▸ head -n 1 (take the first item from the list)
  • 63.
  • 64. GETTING THINGS DONE SECURITY AND SUDO ▸ Files are not executable by default ▸ Unix has a lot of power if you need it ▸ Users do not have super powers ▸ You need to be an admin to use super powers ▸ Super User DO
  • 65. GETTING THINGS DONE HELP !!!!! ▸ Man pages are your friend ! ▸ man ls ▸ man pwd ▸ q to quit
  • 67. TEXT
  • 68.
  • 69.