Tuesday, October 27, 2015

OSX Desktop Setup for Network/Systems Engineers

I enjoy seeing how other people configure their desktops, so here is my setup...

These are the notes I would use if I were to start building a new laptop.  It is not all inclusive, but does cover the minimum things I like to have.


First thing to do, enable the firewall (System Preferences -> Security and Privacy):



Second, check for and configure updates (System Preferences -> App Store):



Third, enable full disk encryption (System Preferences -> Security and Privacy):



Swap around the Caps-Lock and CTRL key.   Why do this you ask?  I use the control key a lot.   Having to move my pinky from to the CTRL key requires me to either bend my finger in a way in which is not comfortable or to move my entire hand.  Switching the CTRL key where Caps-Lock is fixes this problem (System Preferences -> Keyboard -> Modifier Keys...):



Enable software installation from all sources.  There are many pieces of software I install from sources other then the App Store.  If you don't installed 3rd party software like this don't enable it. (System Preferences -> Security and Privacy):



Install iTerm2 as a replacement for the built in terminal program.   Why you ask?  The primary reason I use it is the "Paste Slowly" function.  If you use serial consoles this is a must.  There are many other great features such as saving window arrangements, split panes, profiles, broadcast input, column selection, etc...  Just get it, you won't be disappointed:





Install Xcode tools.   OSX 10.11.x has made this much easier.   Open a terminal and type 'make', it will detect the tools are not installed and ask if you would like to install them:



Install Homebrew the missing package manager for OSX:


Enable lots of desktops.   I sort my desktop layout in the following windows:
  1. Email
  2. Web Browsers
  3. Terminal Windows
  4. Communication (Slack, IRC, Instant Messenger)
  5. Note Taking / TODO List
  6. General Purpose (left open)
  7. Windows 10 in a VM


Configure CTRL+# to switch between desktops.  Remember why we switched the Caps Lock and CTRL key around?  This helps move between tasks quickly (System Preferences -> Keyboard -> Shortcuts):



Display the date on the task bar.  It is good to know what day it is (System Preferences -> Date and Time -> Clock):



Replace the command+<space> with Alfred2.  Why?  To send email, run terminal commands, execute applications, perform a search, plus a whole lot more:



Install Dropbox (personal files) and Box (work files).   I store 99% of my files in the cloud.   It is so convenient to get a new computer out of the box, install this software, and have all your files back in a few minutes (errr... hours) of sync time:




Install mosh.  What is mosh you ask?   A remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.  Homebrew is a good way to install this software:





Install some type of VM software.   We use VMware Fusion at work.  While I use this software to test many different software packages, its primary use case is a Windows 10 desktop.  There are many pieces of software that we must use such as vSphere and Visio.   Additional thoughts after running Windows 10 for a while; It does NOT suck down the battery like it used to.  



Install Java.  Yes, another necessary evil.  Too many "enterprise" software packages require it.




Adjust the power settings in your Windows 10 to keep the VM from going to sleep:





To make it easier to connect to remote SSH hosts, I created what I call a SSH Function File.   Every unix, linux, switch, and router is in this file.  The file is stored on a cloud sync'ed file system with Box.  The following line is added to the .bashrc:

if [ -f ~/box/shared/ssh_functions ]; then
        source ~/box/shared/ssh_functions
fi

The functions file (ssh_functions) looks like:

function host1() { ssh -t -A jumphost.example.com "ssh $USER@host1.example.com" ;}
function host2() { ssh -t -A jumphost.example.com "ssh $USER@host2.example.com" ;}
function host3() { ssh -t -A jumphost.example.com "ssh $USER@host3.example.com" ;}
function host4() { ssh -t -A jumphost.example.com "ssh $USER@host4.example.com" ;}
function host5() { ssh -t -A jumphost.example.com "ssh $USER@host5.example.com" ;}
function jump_ssh() { ssh -t -A jumphost.example.com "ssh $@" ;}

To connect to a host:
$ host1

Or tab complete.   This is the primary reason we use "functions", we can tab complete our SSH connections.   For example, if you group all our devices by something like 'asa-' you can type 'asa-' hit the tab a few times and get the full list of all your ASA devices:
$ hos<tab>


This is an absolute minimum ~/.vimrc, I use many other plugins, but this is a great start:

filetype plugin indent on
syntax on
set modeline
set background=dark
set tabstop=4
set expandtab
set softtabstop=4
set shiftwidth=4





This is all.   There are probably many other little things I have left off.   I encourage you to post in the comments with suggestions and software you find useful in your day-to-day network/system engineering jobs.  

No comments:

Post a Comment

Followers