Create a gist now

Instantly share code, notes, and snippets.

@balupton /LINUX.md
Last active Jan 30, 2017

New Machine Start Kit

New Machine Starter Kit

Installation

Specific Guides

Creating a Bootable USB Key of Windows or Linux

For when you can write the image directly (using MacOS):

  1. Find out the disk location of your usb key using: diskutil list
  2. Unmount the disk: diskutil unmountDisk /dev/diskX
  3. Write the disk: sudo dcfldd if=image.bin of=/dev/diskX (dcfldd is an enhanced version of dd, that will calculate the blocksize for you, and output progress as it is going)
    1. OPTIONAL: Sometimes you may have to convert the iso into a img file:hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso
  4. Eject the disk: diskutil eject /dev/diskX

For when you have to configure the image:

Chromium OS

I gave up on Chromium OS, this was my experience.

Bootcamp / Dual Booting on a Mac

Guide here.

Dotfiles

https://github.com/balupton/dotfiles

Credentials

Do this once git is installed (on mac this is after xcode developer tools is installed):

git config --global user.name "Benjamin Lupton"
git config --global user.email "b@lupton.cc"
git config --global github.user balupton

Do this once npm is installed (when using my dotfiles, this is after you have run install):

npm config set init.author.name "Benjamin Lupton"
npm config set init.author.email b@lupton.cc
npm config set init.author.url https://balupton.com
npm config set init.license MIT

Keys

Generating SSH Key

GitHub SSH Tutorial

Use my dotfiles to generate a key:

newsshkey KEY_NAME [YOUR_EMAIL]

Use my dotfiles to use a key:

addsshkey KEY_NAME

Generating new GPG Key

GitHub GPG Tutorial. Keybase.io Tutorial.

Listing the public and secret keys:

gpg --list-keys --keyid-format LONG
gpg --list-secret-keys --keyid-format LONG

Generating the key, don't use a passphrase due to no easy autosaving:

gpg --gen-key
# (1) RSA and RSA (default)
# What keysize do you want? (2048) 4096
# Key is valid for? (0) 1y
# Real name: Benjamin Arthur Lupton
# Email address: b@lupton.cc
# Comment: balbook 

Getting the key:

GPG_SIGNING_KEY=`gpg --list-keys --keyid-format LONG | grep "pub " | sed "s/.*\///g; s/ .*//g"`
gpg --armor --export $GPG_SIGNING_KEY

Using the key with git:

gpg --edit-key $GPG_SIGNING_KEY
# ^ then type `trust`, then select `5 = I trust ultimately`
git config --global user.signingkey $GPG_SIGNING_KEY
git config --global gpg.program $(which gpg)
git config --global tag.gpgsign true
git config --global commit.gpgsign true
echo "no-tty" >> ~/.gnupg/gpg.conf
# ^ http://github.com/isaacs/github/issues/675
# git config --global push.gpgsign true
# ^ github desktop doesn’t support this with: receiving end does not support --signed push

Apps

Nearly everything I use can be found on my Alternativeto.net Profile.

Some things I have referral bonuses for!

Linux

Setup

# If inside vmware install vmware tools (these are just as good as the commercial ones)
sudo apt-get install open-vm-tools open-vm-tools-desktop

# Install git
sudo apt-get install git

# Install dot files
# https://github.com/balupton/dotfiles

# Java Runtime (if needed)
sudo apt-get install openjdk-7-jre

# Java Development Kit (if needed)
sudo apt-get install openjdk-7-jdk 

# Use my dotfile commands to do everything else
removeinstall && install && cleaninstall

Elementary

These days my preferred Linux distribution is Elementary. Fedora failed to setup javac directly, and Ubuntu insisted on using versons that were not compatible with Curtin Univeristy's requirements - plus Unity (Ubuntu's Desktop Shell) is horrible.

Ubuntu

Installation

  1. Use the 32 bit installation (if you need wine)
    1. If you are installing it on a mac, make sure you get the +mac download
  2. Create a bootable USB drive from the image using the guide earlier or this guide
  3. Install Ubuntu
    1. Don't use encryption, LVM is okay - encryption breaks on my laptop
    2. Don't use home folder encryption either, slows boot time

Configuration

  1. Magic Mouse sensitivity xinput --set-prop "balmouse" "Device Accel Constant Deceleration" 3 - source
  2. Enable hibernation and set all suspends to hibernate instead - done because the presario c700 intel wifi stops working with suspend but works fine with hibernate
  3. Set date time to 12 hour

Issues

  1. Bluetooth fails to connect devices (despite saying connected) after suspend/hibernate

MacOS

Backup

  1. Backup with time machine and dropbox
    1. Check ignored time machine folders to see if it contains anything you actually want to restore
  2. Backup Application Support folder just in case

Installation

  1. Download MacOS from the App Store
  2. Create a bootable USB Drive from it: sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ macOS\ Sierra.app
  3. Install MacOS by holding "alt" as it boots up and selecting the install medium

Configuration

  • Trackpad
    • point and click
      • speed 4th from left
      • all options on except for three finger drag
    • scroll and zoom
      • all options on
    • gestures
      • all on except swipe between pages
  • Accessibility
    • double-click speed: 3rd from right
    • Ctrl+scroll for zoom
  • Dictation
    • Voice: Alison
  • Network
    • DHCP

Setup

# Install Command Line Tools (after this restart computer) (Xcode no longer needed for this)
xcode-select --install

# Install dot files
# https://github.com/balupton/dotfiles

# Install stuff 
install  # this is an alias provided by my dotfiles

Apps

Mac App Store:

Safari Extensions:

For the rest, see Apps

@balupton
Owner

If anyone can provide Ubuntu alternatives for the Desktop Apps I use, I'll be eternally grateful :) Been wanting to move to Ubuntu + Unity for a while now, however due to the lack of apps that I use, my workflow would be significantly impaired.

@zenorocha

Awesome list, thanks for sharing @balupton

@tomaspapan

thanks for the inspiration ;)

@iamryandrake

Spelt "superflous" instead of "superfluous" under Currently. I was the same too, used Currently previously.

Also check out Kuvva for Mac and iPhone - beautifully designed wallpapers!

Any thoughts on how we could build out Slate to be super beautiful?

@balupton
Owner

@iamryandrake thanks, fixed the typos - not sure about slate, I ended up giving up on all those tiling managers, divvy was the only one that really worked well for me (until it stopped being maintained)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment