SlideShare a Scribd company logo
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?

More Related Content

Similar to How Do I Unix

Linux: A Getting Started Presentation
Linux: A Getting Started PresentationLinux: A Getting Started Presentation
Linux: A Getting Started Presentation
Nap Ramirez
 
Introduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkiiIntroduction khgjkhygkjiyhgikjyhgikygkii
Introduction khgjkhygkjiyhgikjyhgikygkii
cmdept1
 
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
프로토추천♬♬W­Е­4­9­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
itsming
 

Similar to 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­닷­С­О­М♬♬고액배팅사이트め고액배팅사이트め프로토
 

More from Derek Graham

More from 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
 

Recently uploaded

Recently uploaded (20)

ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Server-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at PricelineServer-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at Priceline
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 

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.