SlideShare a Scribd company logo
1 of 29
Download to read offline
Unix is my IDE
Tomáš Kramár, @tkramar
Integrated Development
Environment
The primary rationale for using an IDE
is that it gathers all your tools in the
same place, and you can use them in
concert with roughly the same user
interface paradigm, and without
having to exert too much effort to make
separate applications cooperate.
Using UNIX as IDE
●   Shell tips
●   ZSH
●   Moving around
●   Terminal multiplexor
●   Composing commands
●   Customizing applications
Shell tips
#1 I need to run a long
command I ran previously
Wrong:
● lookup the parameters and type it all again
● <up> <up> <up> ....
● grep .bash_history

Good:
● <c-r>, start typing, <c-r> to scroll results
#2 Oops, I made a typo
Wrong
● <left> <left> <backspace> <backspace> ....
Good
● <c-u> - deletes from cursor to the beginning
● <c-k> - deletes from cursor to the end
● <c-w> - deletes word before cursor
● <c-a> - move to the beginning
● <c-e> - move to the end
Better
● use vi-mode
#3 I need to switch to a
different application
e.g., I am in vim and want to try something in
irb

Wrong:
● open new terminal window

Good
● <c-z> to suspend
● fg to resume
#4 I need to disconnect
from remote machine
Wrong
● Ok, I'll wait

Good
● <c-z> to suspend
● bg to run in background
● disown to ignore SIGHUP
#5 I forgot sudo
Wrong
● <up> <c-a> sudo <cr>

Good
● sudo !!
● !! is alias for last command

Better
● Custom keybinding that inserts sudo
#6 I want to change this
file's extension
Wrong
● cp /opt/nginx/conf/nginx.conf
  /opt/nginx/conf/nginx.conf.bak

Good
● cp /opt/nginx/conf/nginx.conf{,.bak}
#7 I want to exit the shell
Wrong
● type 'exit'
● click close button

Good
● <c-d>
Keybindings work everywhere (readline).
● mysql
● psql
● irb
● ..
● even browser's textarea
ZSH
Features
● Autocompletion menu
● Autocomplete everything
  ○   command line parameters
  ○   remote servers
  ○   remote filesystems
  ○   context-sensitive completion (e.g., dvips, git)
  ○   kill
● Fuzzy autocompletion
● Globbing
  ○ ls **/*.txt
Moving around
Stupid tricks
● autocomplete
● "cd" (no args) back to home
● "cd -" back to previous directory
Use the dirstack
● dirs -v
● pushd/popd

Or

● setopt auto_pushd
● cd +3
Ranger
● https://github.com/hut/ranger
● OSX Finder w vim keybindings
● Integrates with shell easily
Terminal multiplexor
tmux
● multiplexes several virtual terminals
● sessions/windows
● tile management
Composing commands
How do you identify your
largest files?
How do you identify your
 largest files?
wc -l **/*.rb | tac | tail -n +2 | sort -n -r | head -10
Customizing applications
Embrace aliases
alias grep="grep --color=auto"
alias lsa="ls -AahXBFov --color=auto --
indicator-style=file-type --group-directories-first"

alias pacman="sudo pacman"

Application level aliases
● git la
dotfiles
● Most applications are configurable in plain
  text
  ○ .vimrc, .zshrc, .ranger, .rvm, .ssh ...
  ○ Transfer between machines, backup, restore
Resources
● http://dotfiles.github.com/
● https://github.com/kremso/dotfiles

● https://github.com/robbyrussell/oh-my-zsh

More Related Content

What's hot

Lenguajes pc^2
Lenguajes pc^2Lenguajes pc^2
Lenguajes pc^2
berthin
 

What's hot (20)

Python Subprocess
Python SubprocessPython Subprocess
Python Subprocess
 
Shell.me
Shell.meShell.me
Shell.me
 
Shellprogramming
ShellprogrammingShellprogramming
Shellprogramming
 
Nodeschool
NodeschoolNodeschool
Nodeschool
 
Laziness with Gulp
Laziness with GulpLaziness with Gulp
Laziness with Gulp
 
Ansible 2.0 spblug
Ansible 2.0 spblugAnsible 2.0 spblug
Ansible 2.0 spblug
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task Runner
 
Grunt All Day
Grunt All DayGrunt All Day
Grunt All Day
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
GroovyConsole
GroovyConsoleGroovyConsole
GroovyConsole
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 
Cron
CronCron
Cron
 
Thin
ThinThin
Thin
 
Lenguajes pc^2
Lenguajes pc^2Lenguajes pc^2
Lenguajes pc^2
 
Vimm
VimmVimm
Vimm
 
What grunt?
What grunt?What grunt?
What grunt?
 
Puppeteer
PuppeteerPuppeteer
Puppeteer
 
Production Ready Javascript With Grunt
Production Ready Javascript With GruntProduction Ready Javascript With Grunt
Production Ready Javascript With Grunt
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.js
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
 

Similar to Unix is my IDE

Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Docker, Inc.
 
Introduction to Docker and Containers
Introduction to Docker and ContainersIntroduction to Docker and Containers
Introduction to Docker and Containers
Docker, Inc.
 
Slash n: Technical Session 8 - Making Time - minute by minute - Janmejay Singh
Slash n: Technical Session 8 - Making Time - minute by minute - Janmejay SinghSlash n: Technical Session 8 - Making Time - minute by minute - Janmejay Singh
Slash n: Technical Session 8 - Making Time - minute by minute - Janmejay Singh
slashn
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
rkhatibi
 
Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2
Davor Guttierrez
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
Chris Tankersley
 

Similar to Unix is my IDE (20)

Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
 
Adhocr T-dose 2012
Adhocr T-dose 2012Adhocr T-dose 2012
Adhocr T-dose 2012
 
Docker session III: Dockerfile
Docker session III: DockerfileDocker session III: Dockerfile
Docker session III: Dockerfile
 
Tips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development EfficiencyTips and Tricks for Increased Development Efficiency
Tips and Tricks for Increased Development Efficiency
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Introduction to Docker (as presented at December 2013 Global Hackathon)
Introduction to Docker (as presented at December 2013 Global Hackathon)Introduction to Docker (as presented at December 2013 Global Hackathon)
Introduction to Docker (as presented at December 2013 Global Hackathon)
 
Linux
LinuxLinux
Linux
 
Introduction to Docker and Containers
Introduction to Docker and ContainersIntroduction to Docker and Containers
Introduction to Docker and Containers
 
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo..."Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Mac OSX Terminal 101
Mac OSX Terminal 101Mac OSX Terminal 101
Mac OSX Terminal 101
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Slash n: Technical Session 8 - Making Time - minute by minute - Janmejay Singh
Slash n: Technical Session 8 - Making Time - minute by minute - Janmejay SinghSlash n: Technical Session 8 - Making Time - minute by minute - Janmejay Singh
Slash n: Technical Session 8 - Making Time - minute by minute - Janmejay Singh
 
Practical SystemTAP basics: Perl memory profiling
Practical SystemTAP basics: Perl memory profilingPractical SystemTAP basics: Perl memory profiling
Practical SystemTAP basics: Perl memory profiling
 
Creating a Mature Puppet System
Creating a Mature Puppet SystemCreating a Mature Puppet System
Creating a Mature Puppet System
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2
 
Modernize Your Drupal Development
Modernize Your Drupal DevelopmentModernize Your Drupal Development
Modernize Your Drupal Development
 

More from tkramar

Learning to rank fulltext results from clicks
Learning to rank fulltext results from clicksLearning to rank fulltext results from clicks
Learning to rank fulltext results from clicks
tkramar
 
Live Streaming & Server Sent Events
Live Streaming & Server Sent EventsLive Streaming & Server Sent Events
Live Streaming & Server Sent Events
tkramar
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontend
tkramar
 
MongoDB: Repository for Web-scale metadata
MongoDB: Repository for Web-scale metadataMongoDB: Repository for Web-scale metadata
MongoDB: Repository for Web-scale metadata
tkramar
 
Cassandra: Indexing and discovering similar images
Cassandra: Indexing and discovering similar imagesCassandra: Indexing and discovering similar images
Cassandra: Indexing and discovering similar images
tkramar
 
CouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy serverCouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy server
tkramar
 
Ruby vim
Ruby vimRuby vim
Ruby vim
tkramar
 

More from tkramar (8)

Lessons learned from SearchD development
Lessons learned from SearchD developmentLessons learned from SearchD development
Lessons learned from SearchD development
 
Learning to rank fulltext results from clicks
Learning to rank fulltext results from clicksLearning to rank fulltext results from clicks
Learning to rank fulltext results from clicks
 
Live Streaming & Server Sent Events
Live Streaming & Server Sent EventsLive Streaming & Server Sent Events
Live Streaming & Server Sent Events
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontend
 
MongoDB: Repository for Web-scale metadata
MongoDB: Repository for Web-scale metadataMongoDB: Repository for Web-scale metadata
MongoDB: Repository for Web-scale metadata
 
Cassandra: Indexing and discovering similar images
Cassandra: Indexing and discovering similar imagesCassandra: Indexing and discovering similar images
Cassandra: Indexing and discovering similar images
 
CouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy serverCouchDB: replicated data store for distributed proxy server
CouchDB: replicated data store for distributed proxy server
 
Ruby vim
Ruby vimRuby vim
Ruby vim
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Unix is my IDE

  • 1. Unix is my IDE Tomáš Kramár, @tkramar
  • 2.
  • 3.
  • 4. Integrated Development Environment The primary rationale for using an IDE is that it gathers all your tools in the same place, and you can use them in concert with roughly the same user interface paradigm, and without having to exert too much effort to make separate applications cooperate.
  • 5. Using UNIX as IDE ● Shell tips ● ZSH ● Moving around ● Terminal multiplexor ● Composing commands ● Customizing applications
  • 7. #1 I need to run a long command I ran previously Wrong: ● lookup the parameters and type it all again ● <up> <up> <up> .... ● grep .bash_history Good: ● <c-r>, start typing, <c-r> to scroll results
  • 8. #2 Oops, I made a typo Wrong ● <left> <left> <backspace> <backspace> .... Good ● <c-u> - deletes from cursor to the beginning ● <c-k> - deletes from cursor to the end ● <c-w> - deletes word before cursor ● <c-a> - move to the beginning ● <c-e> - move to the end Better ● use vi-mode
  • 9. #3 I need to switch to a different application e.g., I am in vim and want to try something in irb Wrong: ● open new terminal window Good ● <c-z> to suspend ● fg to resume
  • 10. #4 I need to disconnect from remote machine Wrong ● Ok, I'll wait Good ● <c-z> to suspend ● bg to run in background ● disown to ignore SIGHUP
  • 11. #5 I forgot sudo Wrong ● <up> <c-a> sudo <cr> Good ● sudo !! ● !! is alias for last command Better ● Custom keybinding that inserts sudo
  • 12. #6 I want to change this file's extension Wrong ● cp /opt/nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf.bak Good ● cp /opt/nginx/conf/nginx.conf{,.bak}
  • 13. #7 I want to exit the shell Wrong ● type 'exit' ● click close button Good ● <c-d>
  • 14. Keybindings work everywhere (readline). ● mysql ● psql ● irb ● .. ● even browser's textarea
  • 15. ZSH
  • 16. Features ● Autocompletion menu ● Autocomplete everything ○ command line parameters ○ remote servers ○ remote filesystems ○ context-sensitive completion (e.g., dvips, git) ○ kill ● Fuzzy autocompletion ● Globbing ○ ls **/*.txt
  • 18. Stupid tricks ● autocomplete ● "cd" (no args) back to home ● "cd -" back to previous directory
  • 19. Use the dirstack ● dirs -v ● pushd/popd Or ● setopt auto_pushd ● cd +3
  • 20. Ranger ● https://github.com/hut/ranger ● OSX Finder w vim keybindings ● Integrates with shell easily
  • 22. tmux ● multiplexes several virtual terminals ● sessions/windows ● tile management
  • 24. How do you identify your largest files?
  • 25. How do you identify your largest files? wc -l **/*.rb | tac | tail -n +2 | sort -n -r | head -10
  • 27. Embrace aliases alias grep="grep --color=auto" alias lsa="ls -AahXBFov --color=auto -- indicator-style=file-type --group-directories-first" alias pacman="sudo pacman" Application level aliases ● git la
  • 28. dotfiles ● Most applications are configurable in plain text ○ .vimrc, .zshrc, .ranger, .rvm, .ssh ... ○ Transfer between machines, backup, restore