SlideShare a Scribd company logo
1 of 70
Ultimate UNIX Setup For
Developers
Jacob Menke – Software Engineer && Business ComputerTechnologies LabTechnician (Ann Arbor MI)
Boring and not too usable defaults…
Config Files &&YouTubeTutorials
 https://github.com/MenkeTechnologies/TutorialFiles
 https://www.youtube.com/channel/UCLOQFBXPrcVvO2Wb3
wna8Ow
 RecentTopics : GNU Readline Shortcuts in mysql, python3
and various REPLs
 http://jakobmenke.com/
Custom Shell functions
 cd
 aliases > functions > reserved words > builtins > external
commands in PATH > not found
clearList
 clearList == bash fxn
 clear && ls -AlhFi
Functions and aliases
UNIX Spirit – One letter commands. The more cryptic and less typing the better
Aliases Demo
Package Managers
 Mac => Homebrew, MacPorts, Fink
 Homebrew HomePage => https://brew.sh/
 install => /usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/maste
r/install)"
Homebrew Jargon
 Package == Formula == ruby file
 installed into /usr/local/Cellar/<package> with symlinks into
/usr/local/bin, /usr/local/lib etc
 Taps == Github repositories
 Homebrew Core Repo Formulae
 downloaded to
/usr/local/Homebrew/Library/taps/homebrew/homebrew-
core/formula
 Bottle == binary program already built for macOS (configure and
make already done for you)
 cask == GUI program
Homebrew Formula
brew install zzz
Homebrew Exploration
Homebrew
 brew install <package>
 brew ls
 brew rm <package>
 brew search <package>
 brew cleanup
 brew update
 brew upgrade
 brew cask install <gui-
package>
 brew cask zap <gui-
package>
 brew cask rm <gui>
Homebrew Demo
Package Managers
 Linux
 Debian based = Debian, Ubuntu, Mint, Raspbian, Kali
 Dpkg, apt, aptitude
 RPM based = Red Hat, Fedora, CentOS
 Rpm, yum
Apt
 sudo apt-get install <package>
 sudo apt-cache search <package>
 sudo apt-get purge <package>
 dpkg –l = list all installed packages
 dpkg –L <package> = show files for this package
 sudo apt-get update
 sudo apt-get upgrade
Tmux
 Terminal Multiplexer
 brew install tmux
 sudo apt-get install tmux
Tmux Commands
 tmux = start server
 tmux new-session –t <session-name>
 tmux new-window –t <window-name>
 tmux split-window = horizontal split pane
 tmux list-sessions (tmux ls) = list sessions
 tmux list-windows
 tmux list-panes
Tmux Commands
 tmux attach –t <session-name>
 tmux kill-session [–t <session-name>]
 tmux kill-window [–t <window-name>]
 tmux kill-pane [–t <pane>]
Tmux Demo
Inside ofTmux
 Prefix = defaults to ^B (Control B) but can be changed
 <prefix> + % => vertical split
 <prefix> + “ = horizontal split
 <prefix> + c = new window
 <prefix> + n = next window
 <prefix> + p = previous window
 <prefix> + : => command line inside tmux similar to vim
 <prefix> + : then kill-pane = kills current pane
 === tmux kill-pane
~/.tmux.conf
 Prefix = defaults to control b but can be changed
 These lines bind:
 prefix to ^a
 <prefix> - | to split vertically
 <prefix> - - to split horizontally
Tmux Demo
Tmux scripts
 usually located in ~/.tmux directory
 list of tmux commands to run
 could be run as tmux selectp –t 0 or <prefix>+: selectp –t 0
 ~/.tmux/four-panes
 ~/.tmux.conf
ControlWindow script
Tmux Demo
Htop
 brew install htop
 sudo apt-get install htop
 Similar to top but shows core usages
 / to search
 space to tag process
 k to kill process
Htop demo
ccze
 brew install ccze
 sudo apt-get install ccze
 tail –f /var/log/**/*.log | ccze
 sudo id = shows up in /var/log/system.log on Mac and
/var/log/auth.log on Linux
Logging with color bash script
ccze demo
iftop
 brew install iftop
 sudo apt-get install iftop
 sudo iftop –c ~/.iftop.conf
 while running:
 t = toggle bar display modes
 q = quit
 f = filter
 h = help
~/.iftop.conf
 port-display:on
 line-display:one-line-both
 interface: en0
iftop - colorized
 git clone https://github.com/MenkeTechnologies/iftopcolor
 ./configure && make
 sudo make install or move executable ./iftop to somewhere in
PATH
iftop demo
grc – general colorizer
 https://github.com/garabik/grc
 brew install grc
 sudo apt-get install grc
grc config files
 Mac: /usr/local/share/grc/conf.ls
 Linux:/usr/share/grc/conf.ls
 each command that will be colorized has its corresponding
config file
 automatic aliases
 usage: grc netstat
 grc –c /usr/local/share/grc/conf.ls ping google.com
Automatic Aliasing (Over aliases)
 curl https://raw.githubusercontent.com/garabik/grc/master/grc.zsh
-O $HOME/grc.zsh
 ~/.zshrc : [[ -s ”$HOME/grc.zsh" ]] && source
“$HOME/grc.zsh”
 ping is now alias for grc ping
Regex
grc demo
 ping
 ifconfig
 dd
 ps
Python programs
 Glances = pip package
 Powerline status = pip package
 brew install python = goes into /usr/local/Cellar/python/<version-
number>
 pip, package manager for python, should be included
 Mac: pip installs packages to /usr/local/lib/python2.7/site-packages
on
 Debian: pip installs packages to /usr/local/lib/python2.7/dist-
packages
Pip exploration
pip
 pip install <package>
 pip show <package>
 for package in $(pip list –outdated);do pip install $package
done
Powerline
 Status bars for vim, tmux
 requires special fonts for triangles such as Nerd Fonts
 https://github.com/ryanoasis/nerd-fonts
 pip install powerline-status
 ~/.tmux.conf
 ~/.vimrc
Powerline forVim
 recommend to install latest vim 8+
 brew install vim
 sudo apt-get install vim
 brew install macvim (fastest for mac IMO)
 mvim –v <file> = stay in terminal
 mvim <file> = launch gui
Powerline forVim
Macvim Demo
PowerlineTmux Status Bar
 http://powerline.readthedocs.io/en/master/usage/other.html
#tmux-statusline
 Define tmux status line in JSON file =>
 $HOME/.config/powerline/themes/tmux
PowerlineTmux StatusBar Demo
My Prompt == Powerlevel 9k
 https://github.com/bhilburn/powerlevel9k
 using Knack Nerd Font
 brew tap caskroom/fonts
 brew cask install font-hack-nerd-font
Powerlevel9k prompt config
Prompt Demo
glances
 pip install glances
 on Mac installs to /usr/local/lib/python2.7/site-
packages/glances
 Debian installs to /usr/local/lib/python2.7/dist-packages
 https://github.com/nicolargo/glances
glances
 sudo glances [--disable-alert] [--disable-network]
 To change text color from white to blue:
 Change line 203 in glances/outputs/glances_curses.py
 curses.init_pair(1, curses.COLOR_WHITE, -1)=>
 curses.init_pair(1, curses.COLOR_BLUE, -1)
glances demo
Oh-my-zsh
 Framework for zsh, geared toward developers
 Tons of prompts and plugins
 https://github.com/robbyrussell/oh-my-zsh
Oh my zsh install
 sh -c "$(curl -fsSL
https://raw.githubusercontent.com/robbyrussell/oh-my-
zsh/master/tools/install.sh)”
Oh my zsh Plugins
 git clone into ~/.oh-my-zsh/custom/plugins
 add to plugins array ~/.zshrc
Zsh-autosuggestions
 copy of FISH (friendly interactive shell)’s suggestions
 Searches history (~/.zsh-history) for most recent commands
starting with letters typed
 hit right arrow to complete the suggestion
 git clone https://github.com/zsh-users/zsh-autosuggestions
$ZSH_CUSTOM/plugins/zsh-autosuggestions
 add to plugins array in ~/.zshrc
Zsh-syntax highlighting
 Red if invalid command, green if found in PATH
 highlighting for quotes
 git clone https://github.com/zsh-users/zsh-syntax-
highlighting.git ${ZSH_CUSTOM:-~/.oh-my-
zsh/custom}/plugins/zsh-syntax-highlighting
 add to plugins array in ~/.zshrc
Zsh-completions
 adds zsh completions for more commands
 git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-
zsh/custom/plugins/zsh-completions
 add to plugins array in ~/.zshrc
zsh plugins demo
z command
 creates database of visited directories
 usage: z <directory-name>
 directory-name can be just a few letters of the name
 if there is a match you will cd to that directory otherwise no
cd
z install
 git clone
https://raw.githubusercontent.com/rupa/z/master/z.sh
$HOME
 source ~/z.sh
Zle line editor in ~/.zshrc
z and ZLE demo

More Related Content

What's hot

More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
 
Installation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstInstallation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstJawad Khan
 
Query to find permspace to all databases
Query to find permspace to all databasesQuery to find permspace to all databases
Query to find permspace to all databasesNaresh Chandra Kumar
 
Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyTony Hirst
 
linux_Commads
linux_Commadslinux_Commads
linux_Commadstastedone
 
Install tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileInstall tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileNguyen Cao Hung
 
3.1.b how to - colors and prompts in bash
3.1.b how to - colors and prompts in bash3.1.b how to - colors and prompts in bash
3.1.b how to - colors and prompts in bashAcácio Oliveira
 
Backup and restore router configuration
Backup and restore router configurationBackup and restore router configuration
Backup and restore router configurationVasilis Nikitaras
 
Raspberry PI iGate with TNC Direwolf Soundmodem
Raspberry PI iGate with TNC Direwolf SoundmodemRaspberry PI iGate with TNC Direwolf Soundmodem
Raspberry PI iGate with TNC Direwolf SoundmodemAURELIO PY5BK
 
Vmware Command Line
Vmware   Command LineVmware   Command Line
Vmware Command Linelifeit
 
Athenticated smaba server config with open vpn
Athenticated smaba server  config with open vpnAthenticated smaba server  config with open vpn
Athenticated smaba server config with open vpnChanaka Lasantha
 
Presentation Linux Server setup Advance Networking
Presentation   Linux Server setup Advance NetworkingPresentation   Linux Server setup Advance Networking
Presentation Linux Server setup Advance NetworkingTariqul Islam Shohag
 

What's hot (19)

More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...
 
Installation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstInstallation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling first
 
Query to find permspace to all databases
Query to find permspace to all databasesQuery to find permspace to all databases
Query to find permspace to all databases
 
Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 py
 
linux_Commads
linux_Commadslinux_Commads
linux_Commads
 
Install tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileInstall tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war file
 
3.1.b how to - colors and prompts in bash
3.1.b how to - colors and prompts in bash3.1.b how to - colors and prompts in bash
3.1.b how to - colors and prompts in bash
 
Backup and restore router configuration
Backup and restore router configurationBackup and restore router configuration
Backup and restore router configuration
 
Raspberry PI iGate with TNC Direwolf Soundmodem
Raspberry PI iGate with TNC Direwolf SoundmodemRaspberry PI iGate with TNC Direwolf Soundmodem
Raspberry PI iGate with TNC Direwolf Soundmodem
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Watch Me Install Alfresco
Watch Me Install AlfrescoWatch Me Install Alfresco
Watch Me Install Alfresco
 
Samba
SambaSamba
Samba
 
Vmware Command Line
Vmware   Command LineVmware   Command Line
Vmware Command Line
 
Readme
ReadmeReadme
Readme
 
Athenticated smaba server config with open vpn
Athenticated smaba server  config with open vpnAthenticated smaba server  config with open vpn
Athenticated smaba server config with open vpn
 
Adb instructions
Adb instructionsAdb instructions
Adb instructions
 
Intro commandline
Intro commandlineIntro commandline
Intro commandline
 
Presentation Linux Server setup Advance Networking
Presentation   Linux Server setup Advance NetworkingPresentation   Linux Server setup Advance Networking
Presentation Linux Server setup Advance Networking
 
Unix
UnixUnix
Unix
 

Similar to Ultimate Unix Meetup Presentation

Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...Jim Birch
 
Batch file programming
Batch file programmingBatch file programming
Batch file programmingswapnil kapate
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratchjoshuasoundcloud
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksGlen Ogilvie
 
ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions Chanaka Lasantha
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Ata Rehman
 
Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Henning Sprang
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)Rodrigo Maia
 
Generating keyboard in raspberry pi
Generating keyboard in raspberry piGenerating keyboard in raspberry pi
Generating keyboard in raspberry piPrabhanda Prabha
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleStein Inge Morisbak
 
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Joachim Jacob
 
Terminal linux commands_ Fedora based
Terminal  linux commands_ Fedora basedTerminal  linux commands_ Fedora based
Terminal linux commands_ Fedora basedNavin Thapa
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentationbrian_dailey
 

Similar to Ultimate Unix Meetup Presentation (20)

lec4.docx
lec4.docxlec4.docx
lec4.docx
 
Linux
LinuxLinux
Linux
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
 
Batch file programming
Batch file programmingBatch file programming
Batch file programming
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions ERP System Implementation Kubernetes Cluster with Sticky Sessions
ERP System Implementation Kubernetes Cluster with Sticky Sessions
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
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
 
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
 
Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
 
Generating keyboard in raspberry pi
Generating keyboard in raspberry piGenerating keyboard in raspberry pi
Generating keyboard in raspberry pi
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Examples -partII
Examples -partIIExamples -partII
Examples -partII
 
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
 
Terminal linux commands_ Fedora based
Terminal  linux commands_ Fedora basedTerminal  linux commands_ Fedora based
Terminal linux commands_ Fedora based
 
Linux
LinuxLinux
Linux
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
 

Recently uploaded

Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKUXDXConf
 
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...CzechDreamin
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
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áCzechDreamin
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
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)Julian Hyde
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
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 1DianaGray10
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfEasyPrinterHelp
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
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.pptxDavid Michel
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
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 2024Stephanie Beckett
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 

Recently uploaded (20)

Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
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...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
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á
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
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)
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
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
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
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
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
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
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 

Ultimate Unix Meetup Presentation

  • 1. Ultimate UNIX Setup For Developers Jacob Menke – Software Engineer && Business ComputerTechnologies LabTechnician (Ann Arbor MI)
  • 2. Boring and not too usable defaults…
  • 3.
  • 4. Config Files &&YouTubeTutorials  https://github.com/MenkeTechnologies/TutorialFiles  https://www.youtube.com/channel/UCLOQFBXPrcVvO2Wb3 wna8Ow  RecentTopics : GNU Readline Shortcuts in mysql, python3 and various REPLs  http://jakobmenke.com/
  • 5. Custom Shell functions  cd  aliases > functions > reserved words > builtins > external commands in PATH > not found
  • 6. clearList  clearList == bash fxn  clear && ls -AlhFi
  • 7. Functions and aliases UNIX Spirit – One letter commands. The more cryptic and less typing the better
  • 9. Package Managers  Mac => Homebrew, MacPorts, Fink  Homebrew HomePage => https://brew.sh/  install => /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/maste r/install)"
  • 10. Homebrew Jargon  Package == Formula == ruby file  installed into /usr/local/Cellar/<package> with symlinks into /usr/local/bin, /usr/local/lib etc  Taps == Github repositories  Homebrew Core Repo Formulae  downloaded to /usr/local/Homebrew/Library/taps/homebrew/homebrew- core/formula  Bottle == binary program already built for macOS (configure and make already done for you)  cask == GUI program
  • 13. Homebrew  brew install <package>  brew ls  brew rm <package>  brew search <package>  brew cleanup  brew update  brew upgrade  brew cask install <gui- package>  brew cask zap <gui- package>  brew cask rm <gui>
  • 15. Package Managers  Linux  Debian based = Debian, Ubuntu, Mint, Raspbian, Kali  Dpkg, apt, aptitude  RPM based = Red Hat, Fedora, CentOS  Rpm, yum
  • 16. Apt  sudo apt-get install <package>  sudo apt-cache search <package>  sudo apt-get purge <package>  dpkg –l = list all installed packages  dpkg –L <package> = show files for this package  sudo apt-get update  sudo apt-get upgrade
  • 17. Tmux  Terminal Multiplexer  brew install tmux  sudo apt-get install tmux
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Tmux Commands  tmux = start server  tmux new-session –t <session-name>  tmux new-window –t <window-name>  tmux split-window = horizontal split pane  tmux list-sessions (tmux ls) = list sessions  tmux list-windows  tmux list-panes
  • 23. Tmux Commands  tmux attach –t <session-name>  tmux kill-session [–t <session-name>]  tmux kill-window [–t <window-name>]  tmux kill-pane [–t <pane>]
  • 25. Inside ofTmux  Prefix = defaults to ^B (Control B) but can be changed  <prefix> + % => vertical split  <prefix> + “ = horizontal split  <prefix> + c = new window  <prefix> + n = next window  <prefix> + p = previous window  <prefix> + : => command line inside tmux similar to vim  <prefix> + : then kill-pane = kills current pane  === tmux kill-pane
  • 26. ~/.tmux.conf  Prefix = defaults to control b but can be changed  These lines bind:  prefix to ^a  <prefix> - | to split vertically  <prefix> - - to split horizontally
  • 28. Tmux scripts  usually located in ~/.tmux directory  list of tmux commands to run  could be run as tmux selectp –t 0 or <prefix>+: selectp –t 0  ~/.tmux/four-panes  ~/.tmux.conf
  • 31. Htop  brew install htop  sudo apt-get install htop  Similar to top but shows core usages  / to search  space to tag process  k to kill process
  • 33. ccze  brew install ccze  sudo apt-get install ccze  tail –f /var/log/**/*.log | ccze  sudo id = shows up in /var/log/system.log on Mac and /var/log/auth.log on Linux
  • 34. Logging with color bash script
  • 36. iftop  brew install iftop  sudo apt-get install iftop  sudo iftop –c ~/.iftop.conf  while running:  t = toggle bar display modes  q = quit  f = filter  h = help
  • 38. iftop - colorized  git clone https://github.com/MenkeTechnologies/iftopcolor  ./configure && make  sudo make install or move executable ./iftop to somewhere in PATH
  • 40. grc – general colorizer  https://github.com/garabik/grc  brew install grc  sudo apt-get install grc
  • 41. grc config files  Mac: /usr/local/share/grc/conf.ls  Linux:/usr/share/grc/conf.ls  each command that will be colorized has its corresponding config file  automatic aliases  usage: grc netstat  grc –c /usr/local/share/grc/conf.ls ping google.com
  • 42. Automatic Aliasing (Over aliases)  curl https://raw.githubusercontent.com/garabik/grc/master/grc.zsh -O $HOME/grc.zsh  ~/.zshrc : [[ -s ”$HOME/grc.zsh" ]] && source “$HOME/grc.zsh”  ping is now alias for grc ping
  • 43. Regex
  • 44. grc demo  ping  ifconfig  dd  ps
  • 45. Python programs  Glances = pip package  Powerline status = pip package  brew install python = goes into /usr/local/Cellar/python/<version- number>  pip, package manager for python, should be included  Mac: pip installs packages to /usr/local/lib/python2.7/site-packages on  Debian: pip installs packages to /usr/local/lib/python2.7/dist- packages
  • 47. pip  pip install <package>  pip show <package>  for package in $(pip list –outdated);do pip install $package done
  • 48. Powerline  Status bars for vim, tmux  requires special fonts for triangles such as Nerd Fonts  https://github.com/ryanoasis/nerd-fonts  pip install powerline-status  ~/.tmux.conf  ~/.vimrc
  • 49. Powerline forVim  recommend to install latest vim 8+  brew install vim  sudo apt-get install vim  brew install macvim (fastest for mac IMO)  mvim –v <file> = stay in terminal  mvim <file> = launch gui
  • 52. PowerlineTmux Status Bar  http://powerline.readthedocs.io/en/master/usage/other.html #tmux-statusline  Define tmux status line in JSON file =>  $HOME/.config/powerline/themes/tmux
  • 54. My Prompt == Powerlevel 9k  https://github.com/bhilburn/powerlevel9k  using Knack Nerd Font  brew tap caskroom/fonts  brew cask install font-hack-nerd-font
  • 57. glances  pip install glances  on Mac installs to /usr/local/lib/python2.7/site- packages/glances  Debian installs to /usr/local/lib/python2.7/dist-packages  https://github.com/nicolargo/glances
  • 58. glances  sudo glances [--disable-alert] [--disable-network]  To change text color from white to blue:  Change line 203 in glances/outputs/glances_curses.py  curses.init_pair(1, curses.COLOR_WHITE, -1)=>  curses.init_pair(1, curses.COLOR_BLUE, -1)
  • 60. Oh-my-zsh  Framework for zsh, geared toward developers  Tons of prompts and plugins  https://github.com/robbyrussell/oh-my-zsh
  • 61. Oh my zsh install  sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my- zsh/master/tools/install.sh)”
  • 62. Oh my zsh Plugins  git clone into ~/.oh-my-zsh/custom/plugins  add to plugins array ~/.zshrc
  • 63. Zsh-autosuggestions  copy of FISH (friendly interactive shell)’s suggestions  Searches history (~/.zsh-history) for most recent commands starting with letters typed  hit right arrow to complete the suggestion  git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions  add to plugins array in ~/.zshrc
  • 64. Zsh-syntax highlighting  Red if invalid command, green if found in PATH  highlighting for quotes  git clone https://github.com/zsh-users/zsh-syntax- highlighting.git ${ZSH_CUSTOM:-~/.oh-my- zsh/custom}/plugins/zsh-syntax-highlighting  add to plugins array in ~/.zshrc
  • 65. Zsh-completions  adds zsh completions for more commands  git clone https://github.com/zsh-users/zsh-completions ~/.oh-my- zsh/custom/plugins/zsh-completions  add to plugins array in ~/.zshrc
  • 67. z command  creates database of visited directories  usage: z <directory-name>  directory-name can be just a few letters of the name  if there is a match you will cd to that directory otherwise no cd
  • 68. z install  git clone https://raw.githubusercontent.com/rupa/z/master/z.sh $HOME  source ~/z.sh
  • 69. Zle line editor in ~/.zshrc
  • 70. z and ZLE demo