- ask different
- fonctionalities
- fn + F12. go to dashboard (calendar, calculator)
- about .bash_profile
- MacOS (formerly OS X) is based on BSD Unix
- list of installs made:
- less /Library/Receipts/InstallHistory.plist
- machine info
- sysctl -n machdep.cpu.brand_string
- system_profiler | grep Processor
- system_profiler
- updatedb
-
(base) lee@a8:~$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
- (base) lee@a8:~$ sudo /usr/libexec/locate.updatedb
- (base) lee@a8:~$ locate logs
- install kdiff3
- brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/6a96e5ea44803e52a43c0c89242390f75d1581ab/Casks/kdiff3.rb
- if you need to untar things like mvn, you can do so in /usr/local using sudo. Other folders are protected even using sudo
- colors
- console and vi:
- go to terminal (console) / preferences / Profiles / Basic / ANSI Colors
- change them
- brew
- brew list
- brew doctor
- brew services list
- brew services info docker-machine
- brew services start tomcat
- zsh
- ps -ef, htop prefered
- sometimes buggy, switch to bash
- ex: find . |grep ".py"|xargs grep fill (not working on my zsh)
- this works on zsh but not on sh for big files
- sort -u toto.txt > out.txt
- network (use bash)
tcpdump -n -A -p -i lo0 host 127.0.0.1 > tmp.txt
- java
- installed JVM
- lee@al8:~/dev/nemo-etab-etl$ /usr/libexec/java_home -V
- Matching Java Virtual Machines (3):
- 17.0.10 (x86_64) "Oracle Corporation" - "Java SE 17.0.10" /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
- 15.0.2 (x86_64) "Oracle Corporation" - "Java SE 15.0.2" /Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home
- 11.0.7 (x86_64) "Oracle Corporation" - "Java SE 11.0.7" /Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home
- /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
- ll /Library/Java/JavaVirtualMachines/
- switch version, just change JAVA_HOME
- # export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home"
- export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home"