This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:darwin [2016/04/24 04:31] – oemb1905 | computing:darwin [2020/02/12 01:02] (current) – oemb1905 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | #Darwin Basics | + | ------------------------------------------- |
- | #Jonathan Haack | + | * **darwin** |
- | #Haack' | + | * **Jonathan Haack** |
- | #netcmnd@jonathanhaack.com | + | * **Haack' |
+ | * **netcmnd@jonathanhaack.com** | ||
------------------------------------------- | ------------------------------------------- | ||
- | #Path | + | Making a bootable usb stick ... |
- | | + | |
- | | + | |
+ | diskutil unmountDisk < | ||
- | #Force Remove Trash | + | Examples |
- | #User Directory Trashes (sudo not required, but can help) | + | |
- | sudo rm -rf ~/.Trash/* | + | sudo dd if=/Users/me/tails-i386-1.3.iso of=/ |
- | | + | |
- | #All Directory Trashes (sudo not required, but can help) | + | |
- | sudo rm -rf /Volumes/*/.Trashes | + | |
- | #If this still causes trouble, then | + | Insert USB drive into PPC Mac of choice, depress command-option-o-f (open firmware) |
- | login root | + | try usb0, usb1, usb2, etc. until it works and finds the port you used for the img |
- | #Enter password | + | probe-usb |
- | | + | |
+ | boot usb1/disk@1: | ||
- | #Now, all trashes should empty, but it is slow so view | + | once inside the yaboot shell, some common examples are: |
- | #Finder Status bar at / | + | |
- | #Showing hidden items in Finder (highly recommended) | + | install url=mintppc.org |
+ | install | ||
+ | cli | ||
+ | cli-expert | ||
+ | cli64 | ||
+ | cli64-expert | ||
- | defaults write com.apple.finder AppleShowAllFiles TRUE | ||
- | killall Finder | ||
- | #replace with FALSE to change back ... make sure before entering killall | + | ------------------------------------------- |
- | #could also use YES / NO, or 1/0 (have not tested 1/0) | + | #**wireless hardware drivers, b43 cutter +** |
+ | ------------------------------------------- | ||
- | #Hiding Users | + | deb http:// |
+ | deb http:// | ||
+ | apt-get update | ||
+ | sudo lspci | ||
+ | apt-get install firmware-b43-installer | ||
+ | apt-get install firmware-b43-lpphy-installer | ||
+ | apt-get install firmware-b43legacy-installer | ||
- | sudo dscl . create | + | use lspci above and then visit https://wiki.debian.org/bcm43xx#supported-b43 |
- | + | ||
- | #change to 0 to de-activate | + | |
- | + | ||
- | #Moving user directory to var (warning, do this logged in as root) | + | |
- | sudo mv / | + | |
- | + | ||
- | #Then, update the user record path | + | |
- | sudo dscl . -create | + | |
- | + | ||
- | #Remove public share point through Terminal (or go to FS in SP in GUI) | + | |
- | sudo dscl . -delete "/ | + | |
------------------------------------------- | ------------------------------------------- | ||
- | #Homebrew Basics | + | 32bit EFI 64bit .iso notes for GNU/Linux installs |
- | #Install: | + | hdiutil convert |
- | ruby -e " | + | diskutil list |
+ | diskutil partitionDisk | ||
- | #Uninstall: | + | Particularly helpful is partitioning as GPT from command line in macOS: |
- | Download script from GitHub https:// | + | |
- | #Update | + | diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b |
- | | + | |
+ | Back to writing the image to the partition with dd: | ||
+ | |||
+ | dd if=[Directory/ | ||
+ | diskutil eject /dev/disk2 | ||
- | #Cleanup: | + | First, disable Gatekeeper because it is stupid - use Terminal |
- | brew cleanup | + | |
- | #Verify Config: | + | sudo spctl --master-disable |
- | brew doctor | + | |
- | #Update Packages | + | Second, disable System Integrity Protection (SIP) because it is stupid and won't let you dual boot properly. |
- | brew update packagename | + | |
- | #Install from Casks | + | csrutil disable |
- | brew install Caskroom/ | + | |
- | + | ||
- | #To find the Casks in your GUI | + | |
- | / | + | |
- | + | ||
- | #To see what you have installed using your GUI | + | |
- | / | + | |
- | + | ||
- | #Sometimes they are installed by default in opt | + | |
- | #(although this can be changed by an --option) | + | |
- | / | + | |
+ | Now, reboot your Mac normally and enter a Terminal. | ||
+ | | ||
+ | cd ~ | ||
+ | wget https:// | ||
+ | unzip refind-bin-0.11.2.zip | ||
+ | cd refind-bin-0.11.2 | ||
+ | sudo ./ | ||
+ | sudo reboot | ||
+ | | ||
------------------------------------------- | ------------------------------------------- | ||
+ | | ||
+ | PATH Location on macOS | ||
- | #There is debate, mostly from MacPorts & Fink people | + | /Sometimes they are installed by default in opt |
- | #about where to put package Managers: | + | #(although this can be changed by an --option)etc/ |
+ | / | ||
- | #Homebrew will cause problems when building software from source if it is installed in /usr/local. | + | Force Empty Trashes |
+ | sudo rm -rf ~/.Trash/* | ||
+ | sudo rm -rf /Volumes/*/.Trashes | ||
- | #This is the default, which is a bad choice as this path is in the default search path of compilers and other tools. | ||
- | |||
- | #Therefore builds from other packaging software might pick up the wrong dependency, using Homebrew' | ||
- | |||
- | #Years ago, in the very beginning of the project, even MacPorts was using /usr/local. | ||
- | |||
- | #But it turned out not to cooperate with other tools as is documented in their FAQ. | ||
- | |||
- | # | ||
- | #In general, it is usually better to stick to one tool only to avoid all problems. | ||
- | #MacPorts is doing their best to patch out any harcoded paths, e.g. to /sw which is used by Fink. | ||
- | #So usually it will work, but having anything installed in /usr/local will definitely cause problems for it. | ||
- | |||
- | @Raim on StackExchange | ||
- | [[https:// | ||
- | |||
- | #MacPorts addresses this too: | ||
- | [[https:// | ||
------------------------------------------- | ------------------------------------------- | ||
- | # | + | Showing hidden items in Finder |
- | [[http:// | + | defaults write com.apple.finder AppleShowAllFiles TRUE |
+ | killall Finder | ||
- | ------------------------------------------- | ||
- | |||
- | #Common Packages (Will be adding more, this is by no means | ||
- | #exhaustive of what I have used in past). | ||
- | |||
- | * tree | ||
- | * webkit2png | ||
- | * graphicsmagick | ||
- | * git | ||
- | * python | ||
- | * python3 | ||
- | * watch | ||
- | * wget | ||
- | * automake | ||
- | * autoconf | ||
- | * htop | ||
- | * jpegoptim | ||
- | * imagemagick | ||
- | * fish (fish shell) | ||
- | * xquartz | ||
- | * Homebrew cask | ||
- | * ack (like grep) | ||
- | * git | ||
- | * bash-completion | ||
- | * bash completion script | ||
- | * colordiff | ||
- | * ffmpeg | ||
- | * htop | ||
- | * imagemagick | ||
- | * gawk | ||
- | * gnu-sed | ||
- | * cowsay | ||
- | * lftp | ||
- | * wget | ||
- | * axel | ||
- | * tree | ||
- | * unrar | ||
- | * rlwrap | ||
- | * readline wrap | ||
- | * tig | ||
- | * git (command line interface) | ||
- | * youtube-dl | ||
- | * lynx (web browser) | ||
- | * memcached (for caching on web server) | ||
- | * Alpine (new version of Pine) | ||
- | * mutt | ||
- | * vi | ||
- | * emacs | ||
- | * nano | ||
- | * python (add 3 for v.3) | ||
- | * pip | ||
- | * virtualenv | ||
- | * ruby | ||
- | * ruby-build (test versions) | ||
------------------------------------------- | ------------------------------------------- | ||
- | #Install GNU Essentials | + | Hiding Users in macOS. |
- | | + | |
+ | sudo mv / | ||
+ | sudo dscl . -create / | ||
+ | sudo dscl . -delete "/ | ||
+ | sudo reboot | ||
- | #Add to PATH with TextWrangler or: | + | Locate bitcoin wallet private key from Bitcoin-qt console: |
- | sudo open / | + | |
- | sudo nano /etc/paths | + | |
- | #Add the next line after /usr/bin | + | walletpassphrase [enterpassword] |
- | | + | |
- | + | ||
- | #Add to PATH with vi text editor or nano using Terminal | + | |
- | sudo vi / | + | |
- | sudo nano / | + | |
- | + | ||
- | #Path Looks Like This, but bear in mind Homebrew prefers the local bin first | + | |
- | + | ||
- | /usr/bin | + | |
- | / | + | |
- | /bin | + | |
- | /usr/sbin | + | |
- | /sbin | + | |
- | + | ||
- | #Homebrew offers the following instructions about coreutils | + | |
- | + | ||
- | #All commands have been installed with the prefix ' | + | |
- | + | ||
- | #If you really need to use these commands with their normal name can | + | |
- | #add a " | + | |
- | PATH="/ | + | |
- | + | ||
- | # | + | |
- | #" | + | |
- | MANPATH="/ | + | |
- | + | ||
- | #You can also use Text Wrangler to add the GNU commands to Man Pages (or use vi) | + | |
- | / | + | |
- | + | ||
- | #add the following in the Set up PATH to MANPATH mapping section | + | |
- | MANPATH_MAP / | + | |
- | / | + | |
------------------------------------------- | ------------------------------------------- | ||
- | #More GNU commands, but duplicate ones | + | To add shell scripts to Terminal command, open bash.rc, and add this to the fields (first create a directory for your scripts): |
- | | + | |
- | brew install binutils | + | #Then, restart Terminal by: |
- | brew install diffutils | + | |
- | brew install ed --default-names | + | |
- | brew install findutils --with-default-names | + | |
- | brew install gawk | + | |
- | brew install gnu-indent --with-default-names | + | |
- | brew install gnu-sed --with-default-names | + | |
- | brew install gnu-tar --with-default-names | + | |
- | brew install gnu-which --with-default-names | + | |
- | brew install gnutls | + | |
- | brew install grep --with-default-names | + | |
- | brew install gzip | + | |
- | brew install screen | + | |
- | brew install watch | + | |
- | brew install wdiff --with-gettext | + | |
- | brew install wget | + | |
- | #newer versions of tools already on OS X and GNU | + | source .bashrc |
- | brew install bash | + | #I also added the directory of my shell scripts |
- | brew install emacs | + | |
- | brew install gdb gdb requires further actions | + | |
- | brew install gpatch | + | |
- | brew install m4 | + | |
- | brew install make | + | |
- | brew install nano | + | |
- | #commands not on GNU but on OS X but might want newer | + | cd Volumes/ |
+ | nano edit paths | ||
- | brew install file-formula | + | #Then add a line to the scripts folder: |
- | brew install git | + | |
- | brew install less | + | |
- | brew install openssh | + | |
- | brew install perl518 | + | |
- | brew install python | + | |
- | brew install rsync | + | |
- | brew install svn | + | |
- | brew install unzip | + | |
- | brew install vim --override-system-vi | + | |
- | brew install macvim --override-system-vim --custom-system-icons | + | |
- | brew install zsh | + | |
- | ------------------------------------------- | + | / |
- | #Adding scripts to my shell PATH so I can run form command line | + | #To make a script executable (not tested yet - old commands in fodler) |
- | | + | |
------------------------------------------- | ------------------------------------------- | ||
- | #To see what is currently installed | + | #El Capitan Boot Volume command - presuming it is in the Applications directory |
- | | + | |
------------------------------------------- | ------------------------------------------- | ||
- | #Remember, there are third party caskrooms (braumeister has lots of info): | + | #OS X Server Settings |
- | homebrew/ | + | #To require binding |
- | Caskroom/ | + | |
- | Caskroom/ | + | |
- | Caskroom/ | + | |
- | Caskroom/ | + | |
- | Caskroom/ | + | |
- | Caskroom/ | + | |
- | #To install one of them, run (for example): | + | sudo slapconfig -setmacosxodpolicy -binding required |
- | brew install homebrew/ | + | |
- | + | #To rebuild an Open Directory if nothing else works (Quit Server, Run Command, Restart CPU) | |
- | ------------------------------------------- | + | |
- | #Some error readings I got once ... still need to review ... copied and paster below: | + | sudo slapconfig -destroyldapserver |
- | Are you sure you want to uninstall Homebrew? [y/N] y | + | #Making an alias called " |
- | ==> Removing Homebrew installation... | + | alias fix_brew=' |
- | ==> Removing empty directories... | + | |
- | ==> Homebrew uninstalled! | + | |
- | The following possible Homebrew files were not deleted: | + | |
- | * / | + | |
- | * / | + | |
- | * / | + | |
- | You may consider to remove them by yourself. | + | |
- | + | ||
- | #You may want to restore /usr/local's original permissions | + | |
- | | + | |
- | sudo chgrp wheel /usr/local | + | |
| | ||
- | ------------------------------------------- | + | #preferred way of re-owning homebrew is to use this command below |
+ | sudo chown -R `whoami` / | ||
+ | #or | ||
+ | sudo chown -R $USER /usr/local/ | ||
- | #Permissions to manually allow everything for a user | + | #disable System Integrity Protection |
- | #The second command owns a directory by root with group wheel over local directory | + | |
- | #The third restores current user as owner to local directory | + | |
- | + | | |
- | | + | |
- | + | #change gatekeeper settings or disable entirely or re-enable | |
- | sudo chown -R root:wheel /usr/local | + | spctl --status |
- | | + | sudo spctl --master-enable |
- | + | | |
- | ------------------------------------------- | + | |
| | ||
- | #To install alternative repositories for later installation, | + | #Making a shell script executable |
+ | sudo chmod 700 file.sh | ||
- | Homebrew/ | + | #verifying checksum |
- | | + | |
- | Homebrew/homebrew-boneyard | + | |
- | Homebrew/ | + | |
- | Homebrew/ | + | |
- | Homebrew/ | + | |
- | Homebrew/ | + | |
- | Homebrew/ | + | |
- | Homebrew/ | + | |
- | Homebrew/ | + | |
- | davidchall/ | + | |
- | josegonzalez/homebrew-php | + | |
- | brew tap Homebrew/ | + | #make tarball dokuwiki |
+ | tar zcpfv dokuwiki-backup.tar.gz / | ||
+ | |||
+ | #ssh key pair ... later | ||
+ | ssh | ||
- | #To install the brew tap third party packages, look inside the Taps folder in /usr/local to find one, and then | + | #disable ssh on *nix machines |
- | brew install homebrew/homebrew-games/<name of package> | + | su - root |
+ | cd /etc/ssh/ | ||
+ | nano sshd_config | ||
- | #Some are not strict directory paths, but are abbreviations (most likely through | + | #change |
- | | + | ChallengeResponseAuthentication no |
+ | PasswordAuthentication no | ||
+ | | ||
- | ------------------------------------------- | + | #restart ssh - which on linux is below ... macOS uses launchd so not sure yet |
+ | / | ||
+ | |||
+ | #add user from command line - should prompt for password | ||
+ | sudo sysadminctl | ||
+ | |||
+ | #Changing tempermental host name | ||
+ | sudo scutil | ||
+ | sudo scutil | ||
+ | sudo scutil | ||
+ | dscacheutil | ||
- | #To get private key from bitcoin console | + | #pimp bash profile |
- | #Navigate to bitcoin console | + | nano ~/ |
+ | export PS1=" | ||
+ | export CLICOLOR=1 | ||
+ | export LSCOLORS=ExFxBxDxCxegedabagacad | ||
+ | | ||
+ | alias l=' | ||
+ | alias ll='ls -lah' | ||
- | walletpassphrase [enterpassword] | + | #sfcc server - use for thunderbird on macOS and on gnulinux |
- | | + | |
+ | |||
+ | #homebrew changed path ... add sbin to default PATH ... | ||
+ | echo ' | ||
+ | |||
+ | #homebrew remove shallow | ||
- | #Out comes the private key | + | git -C " |
- | ------------------------------------------- | + | Apache password protect directory: |
- | #To add shell scripts to Terminal command, open bash.rc, and add this to the fields (first create a directory for your scripts): | + | sudo htpasswd -c .htpasswd username1 |
+ | sudo htpasswd .htpasswd username2 | ||
- | export PATH="/ | + | syntax for BSD, macOS, and Red Hat: |
- | #Then, restart Terminal by: | + | AuthUserFile / |
+ | AuthGroupFile /dev/null | ||
+ | AuthName " | ||
+ | AuthType Basic | ||
+ | |||
+ | syntax for Debian: | ||
+ | |||
+ | AuthType Basic | ||
+ | AuthUserFile / | ||
+ | AuthName " | ||
+ | Require valid-user | ||
+ | |||
+ | |||
+ | If you have an SMC based Mac, make sure to install macfanctl when installing GNU/Linux on the device: | ||
- | | + | |
+ | apt-get install macfanctld | ||
+ | / | ||
+ | <set desired values> | ||
+ | service macfanctld restart | ||
+ | |||
+ | Chromium API - Q5 - add to ~/.profile | ||
- | #I also added the directory of my shell scripts to the path directory | + | export GOOGLE_API_KEY=" |
+ | export GOOGLE_DEFAULT_CLIENT_ID=" | ||
+ | export GOOGLE_DEFAULT_CLIENT_SECRET=" | ||
- | cd Volumes/ | + | To run the program, you must make a shell script |
- | nano edit paths | + | |
- | + | ||
- | #Then add a line to the scripts folder: | + | |
- | + | ||
- | / | + | |
- | + | ||
- | #To make a script | + | |
- | + | ||
- | chmod +x yourshellscript.sh | + | |
- | + | ||
- | ------------------------------------------- | + | |
- | + | ||
- | #El Capitan Boot Volume command - presuming it is in the Applications directory and is the GM Candidate version ... if not, substitute in version / title of the one you have: | + | |
- | + | ||
- | sudo / | + | |
+ | / | ||
+ | Remove the annoying Gatekeeper ban on open source apps like GIMP | ||
+ | xattr -d com.apple.quarantine / | ||
+ | This tutorial is a designated " | ||
+ | --- // |