Unix bin path how to!

SSD Update
Best thing you can do with an old computer – update the HD to ssd

Well I finaly coughed up and put an ssd into my pre historic laptop (well worth the trouble I might add)!

I decided to do things from scratch as opposed to a complete clone of my original HD, mainly because over the years I have probably installed more crud than I care to think about!


This is how to add your local bin folder to your path!
I only use this info about once every 3-4 years but hear it is for my own edumacation and may be, just maybe it will be useful to someone else!



cd ~/ <– switch into your home dir
nano .bash_profileĀ  <— create file
then add this line to that file
export PATH=$PATH:~/bin

save close terminal then re launch

Enjoy the contents of you bin!
(you can check that it there by running echo $PATH) or if you have some already executable scripts in your bin you can just try running the scripts from the cli.

Works on Mac os X High Sierra


Write an iso to an external drive from Mac os X

 

A quick cheat!

Running an ios based installer from a hard drive, instead of from a usb can often be faster and is useful if you have a swag of machines to re image and esata is a lot faster than say usb V2. I’ve needed to do this a few times but I often spend far to much time looking for the information. So, Now I’ve written this little cheat!

First run this

diskutil list

This will give you a list of drives and the result will look a little like this

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *80.0 GB    disk2

As you can see hear the disk attached I want to write to is /dev/disk2
The command to use is

sudo dd if=linuxmint-18.2-cinnamon-64bit.iso of=/dev/disk2 bs=1m

This will write the contents of the iso the the external drive

Break down of the command

dd if={path_to_iso_image} of/dev/{location of device you want this written to} bs=1m

Enjoy