This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
computing:darwin [2016/04/21 17:24] – created oemb1905 | computing:darwin [2020/02/12 01:02] (current) – oemb1905 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Test | + | ------------------------------------------- |
+ | * **darwin** | ||
+ | * **Jonathan Haack** | ||
+ | * **Haack' | ||
+ | * **netcmnd@jonathanhaack.com** | ||
+ | |||
+ | ------------------------------------------- | ||
+ | Making a bootable usb stick ... | ||
+ | |||
+ | diskutil list | ||
+ | diskutil eraseDisk < | ||
+ | diskutil unmountDisk < | ||
+ | |||
+ | Examples | ||
+ | |||
+ | sudo dd if=/ | ||
+ | sudo dd if=/ | ||
+ | |||
+ | Insert USB drive into PPC Mac of choice, depress command-option-o-f (open firmware) | ||
+ | try usb0, usb1, usb2, etc. until it works and finds the port you used for the img | ||
+ | |||
+ | probe-usb | ||
+ | boot usb0/ | ||
+ | boot usb1/ | ||
+ | |||
+ | once inside the yaboot shell, some common examples are: | ||
+ | |||
+ | install url=mintppc.org | ||
+ | install | ||
+ | cli | ||
+ | cli-expert | ||
+ | cli64 | ||
+ | cli64-expert | ||
+ | |||
+ | |||
+ | ------------------------------------------- | ||
+ | #**wireless hardware drivers, b43 cutter +** | ||
+ | ------------------------------------------- | ||
+ | |||
+ | 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 | ||
+ | |||
+ | use lspci above and then visit https:// | ||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | 32bit EFI 64bit .iso notes for GNU/Linux installs | ||
+ | |||
+ | hdiutil convert -format UDRW -o destination_file.img source_file.iso | ||
+ | diskutil list | ||
+ | diskutil partitionDisk /dev/disk1 1 "Free Space" " | ||
+ | |||
+ | Particularly helpful is partitioning as GPT from command line in macOS: | ||
+ | |||
+ | diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b | ||
+ | |||
+ | Back to writing the image to the partition with dd: | ||
+ | |||
+ | dd if=[Directory/ | ||
+ | diskutil eject / | ||
+ | |||
+ | First, disable Gatekeeper because it is stupid - use Terminal | ||
+ | |||
+ | sudo spctl --master-disable | ||
+ | |||
+ | Second, disable System Integrity Protection (SIP) because it is stupid and won't let you dual boot properly. | ||
+ | |||
+ | csrutil disable | ||
+ | |||
+ | 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 | ||
+ | |||
+ | /Sometimes they are installed by default in opt | ||
+ | #(although this can be changed by an --option)etc/ | ||
+ | / | ||
+ | |||
+ | Force Empty Trashes | ||
+ | sudo rm -rf ~/ | ||
+ | sudo rm -rf / | ||
+ | |||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | Showing hidden items in Finder | ||
+ | |||
+ | defaults write com.apple.finder AppleShowAllFiles TRUE | ||
+ | killall Finder | ||
+ | |||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | Hiding Users in macOS. | ||
+ | |||
+ | sudo dscl . create / | ||
+ | sudo mv / | ||
+ | sudo dscl . -create / | ||
+ | sudo dscl . -delete "/ | ||
+ | sudo reboot | ||
+ | |||
+ | Locate bitcoin wallet private key from Bitcoin-qt console: | ||
+ | |||
+ | walletpassphrase [enterpassword] | ||
+ | dumprivkey [enter public address from gui] | ||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | To add shell scripts to Terminal command, open bash.rc, and add this to the fields (first create a directory for your scripts): | ||
+ | |||
+ | export PATH="/ | ||
+ | |||
+ | #Then, restart Terminal by: | ||
+ | |||
+ | source .bashrc | ||
+ | |||
+ | #I also added the directory of my shell scripts to the path directory | ||
+ | |||
+ | cd Volumes/ | ||
+ | nano edit paths | ||
+ | |||
+ | #Then add a line to the scripts folder: | ||
+ | |||
+ | / | ||
+ | |||
+ | #To make a script executable (not tested yet - old commands in fodler) | ||
+ | |||
+ | 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 / | ||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | #OS X Server Settings | ||
+ | |||
+ | #To require binding | ||
+ | |||
+ | sudo slapconfig -setmacosxodpolicy -binding required | ||
+ | |||
+ | #To rebuild an Open Directory if nothing else works (Quit Server, Run Command, Restart CPU) | ||
+ | |||
+ | sudo slapconfig -destroyldapserver | ||
+ | |||
+ | #Making an alias called " | ||
+ | alias fix_brew=' | ||
+ | |||
+ | #preferred way of re-owning homebrew is to use this command below | ||
+ | sudo chown -R `whoami` / | ||
+ | #or | ||
+ | sudo chown -R $USER / | ||
+ | |||
+ | #disable System Integrity Protection | ||
+ | csrutil disable | ||
+ | csrutil enable | ||
+ | csrutil status | ||
+ | |||
+ | #change gatekeeper settings or disable entirely or re-enable | ||
+ | spctl --status | ||
+ | sudo spctl --master-enable | ||
+ | spctl --add / | ||
+ | |||
+ | #Making a shell script executable | ||
+ | sudo chmod 700 file.sh | ||
+ | |||
+ | #verifying checksum | ||
+ | shasum / | ||
+ | |||
+ | #make tarball dokuwiki | ||
+ | tar zcpfv dokuwiki-backup.tar.gz / | ||
+ | |||
+ | #ssh key pair ... later | ||
+ | ssh | ||
+ | |||
+ | #disable ssh on *nix machines | ||
+ | |||
+ | su - root | ||
+ | cd /etc/ssh/ | ||
+ | nano sshd_config | ||
+ | |||
+ | #change the following lines and make sure to remove comment (#) ... | ||
+ | ChallengeResponseAuthentication no | ||
+ | PasswordAuthentication no | ||
+ | UsePAM 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 -addUser < | ||
+ | |||
+ | #Changing tempermental host name | ||
+ | sudo scutil --set ComputerName " | ||
+ | sudo scutil --set LocalHostName " | ||
+ | sudo scutil --set HostName " | ||
+ | dscacheutil -flushcache | ||
+ | |||
+ | #pimp bash profile | ||
+ | nano ~/ | ||
+ | export PS1=" | ||
+ | export CLICOLOR=1 | ||
+ | export LSCOLORS=ExFxBxDxCxegedabagacad | ||
+ | #alias ls='ls -GFh' | ||
+ | alias l=' | ||
+ | alias ll='ls -lah' | ||
+ | |||
+ | #sfcc server - use for thunderbird on macOS and on gnulinux | ||
+ | https:// | ||
+ | |||
+ | #homebrew changed path ... add sbin to default PATH ... | ||
+ | echo ' | ||
+ | |||
+ | #homebrew remove shallow | ||
+ | |||
+ | git -C " | ||
+ | |||
+ | Apache password protect directory: | ||
+ | |||
+ | sudo htpasswd -c .htpasswd username1 | ||
+ | sudo htpasswd .htpasswd username2 | ||
+ | |||
+ | syntax for BSD, macOS, and Red Hat: | ||
+ | |||
+ | 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 update | ||
+ | apt-get install macfanctld | ||
+ | / | ||
+ | <set desired values> | ||
+ | service macfanctld restart | ||
+ | |||
+ | Chromium API - Q5 - add to ~/ | ||
+ | |||
+ | export GOOGLE_API_KEY=" | ||
+ | export GOOGLE_DEFAULT_CLIENT_ID=" | ||
+ | export GOOGLE_DEFAULT_CLIENT_SECRET=" | ||
+ | |||
+ | To run the program, you must make a shell script that does: | ||
+ | |||
+ | / | ||
+ | |||
+ | Remove the annoying Gatekeeper ban on open source apps like GIMP | ||
+ | |||
+ | xattr -d com.apple.quarantine / | ||
+ | |||
+ | This tutorial is a designated " | ||
+ | |||
+ | --- // |