記錄一下帶Touchbar的Mac日常使用的經(jīng)驗(yàn), OS版本是Mojave 10.14.3螟左。
1. 常用軟件推薦
軟件管理工具:homebrew
屏幕截圖工具:Apowersoft Screenshot (command + 1)
Todo管理工具: MS To-do/Todoist(https://todoist.com/compare_plans)/Trello
瀏覽器工具:Chrome
中文輸入法:Sougou
筆記工具:有道云筆記
編程: Visual Studio Code(Python/Java/Go/C++)
思維導(dǎo)圖:xmind 8
Text編輯工具:? brew cask install atom? ? ?https://atom.io/
Shell工具:
brew cask install iterm2
brew install zsh zsh-completions
chsh -s /bin/zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
source ~/.zshrc
Windows遠(yuǎn)程桌面: microsoft remote desktop
搜索工具: brew cask install alfred
解壓工具:https://theunarchiver.com/? brew install unar/ unar -encoding GBK 繁體字目錄.zip
隨手記工具:Notes
防藍(lán)光:flux
閱讀工具:books
電子書轉(zhuǎn)換管理軟件:https://calibre-ebook.com/download_osx
下載工具:Free Download Managerhttps://www.freedownloadmanager.org/
FTP工具:Filezilla
標(biāo)題欄精簡(jiǎn)工具: vanilla (按Command拖動(dòng)圖標(biāo))
視頻播放工具:brew cask install iina/source player(英語學(xué)習(xí)利器,light就夠用了)
快捷鍵提示工具:brew cask install cheatsheet
詞典工具: 自帶的Dictionary(導(dǎo)入詞庫教程https://sspai.com/post/43155)DictUnifier(StarDict Dictionaries)
DB Tools:https://dbeaver.io/download/
磁盤清理:騰訊檸檬清理https://mac.gj.qq.com/限時(shí)內(nèi)測(cè)碼:E43A726944878257C7984891BEB8031F
查看文件編碼: brew install enca? (enca -L zh_CN 測(cè)試.txt)? file -I {filename}
看圖軟件: https://kantu.qq.com/ (可能會(huì)出現(xiàn)內(nèi)存占用過高問題) 或系統(tǒng)自帶的photos
視頻壓縮:https://handbrake.fr
CHM閱讀器:CHM Reader
免費(fèi)的圖形設(shè)計(jì)軟件:Inkscape (brew cask install xquartz)
2.常用操作和快捷鍵:
軟件安裝:App Store/HomeBrew
軟件卸載:直接拖到Trash(FInder->Applications)
切換輸入法:按Caps Lock可以切換輸入法(在System Preferences->Keyboard設(shè)置)
修改密碼: System Preferences->User&Groups->Your user name->Change Password,然后重啟系統(tǒng)驹闰,如果有keychain變更提示則輸入舊密碼噩茄,更改即可贾费。
快速鎖屏設(shè)置:System Preferences->Desktop&Screen Saver->Hot Corners->Lock Screen
快速解鎖設(shè)置:System Preferences->Touch ID
屏幕截圖:shift+command+5 / 4
修改文件默認(rèn)打開方式: 右鍵點(diǎn)擊文件->Get info->Open with(選擇用什么打開)->Change All
系統(tǒng)日志和監(jiān)控:Launchpad->Other->Activity Monitor可以看CPU穿铆、內(nèi)存艺演、磁盤和耗電/Console可以查看系統(tǒng)日志system.log(/var/log/system.log wifi.log), Command+F可以進(jìn)行搜索。
WIFI診斷:按住Option單擊WIFI標(biāo)志可以查看當(dāng)前WIFI連接的IP和Mac地址以及信號(hào)等詳細(xì)信息贱傀。
強(qiáng)制關(guān)閉某個(gè)應(yīng)用程序:
蘋果圖標(biāo)->Force Quit
Launchpad->Other->Activity Monitor->找到你想結(jié)束的進(jìn)程(Quit->Force Quit)?
通過terminal: ps -ef|grep -i 你想結(jié)束的應(yīng)用關(guān)鍵字/kill 進(jìn)程ID
分辨率設(shè)置(放大字體): System Preferences->Displays->Dispaly->Resolution(Scaled)
Copy/Paste/Cut/Save/Redo: Command + C/V/X/S/Z
Finder中多選:按住command可以進(jìn)行多選
強(qiáng)制退出:Control + C/D
PPT播放: Command+Return
屏幕錄制:QuickTime Player->New Screen Recording
動(dòng)態(tài)壁紙:System Preference->Display->Desktop->Dynamic
Finder配置顯示磁盤和用戶目錄:Finder->Preferences->Siderbar(your name/hard disks)
連接windows共享目錄:Finder->Connect to Server->smb://fs1
重啟進(jìn)入Apple Diagno: Option+D
解決修改/usr/bin出現(xiàn)“Opertion Denied":重啟按住command+R進(jìn)入保護(hù)模式惨撇,打開terminal,輸入csrutil disable(如果要恢復(fù)保護(hù)則csrutil enable)
查看Mac網(wǎng)卡信息: About This Mac->System Report->Network->Wifi
Mac OSX rootless: Command + R when rebooting to enter recovery mode, and open terminal to input "csrutil disable"
Change login options: System Preference->Users & Groups->Login Options->Login Items->+
Clean Keychain:?Launchpad ->Other->KeyChain access->Login->Password/Cert
Mac Mouse: Open button->Click pair button to connect with bluetooth of Mac.
3.homebrew軟件:
安裝:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew -v
使用:brew search/info/install/list/upgrade/uninstall 軟件名稱府寒,比如ipcalc
ipcalc 172.16.0.0/12
brew cask install iterm2 slack alfred dash
brew install git
解決brew update慢的問題:cd "$(brew --repo)"
查看brew源: git remote -v
替換brew.gitgit remote set-url origin https://mirrors.ustc.edu.cn/brew.git
替換homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
替換Homebrew Bottles源:
就是在~/.bashrc或者~/.zshrc文件末尾加
export?HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
切換為官方源:
git remote set-url origin https://github.com/Homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
4.打印機(jī)
下載安裝驅(qū)動(dòng)
連接網(wǎng)絡(luò)打印機(jī):System Preferences->Printers->Add Button(Choose right driver 368/c368 ps)
打印PDF:print->Save as PDF
“Hold for Authentication”故障處理:Finder->Go->Utility->Keychain->刪掉Printer相關(guān)的key魁衙,然后重啟既可以
5.Outlook和日歷
清除Calendars緩存: Finder->Go->Press Options, click Library->Calendars->Move Calendar Cache to Trash(如果要顯示outlook的日歷的話需要添加exchange賬號(hào)并允許系統(tǒng)日歷訪問,并且有push改為每5分鐘讀取株搔,并修改Alert信息Calendar->Get Info->Accounts Info->Accounts/Alerts)
6.Python及開發(fā)環(huán)境(VS Code)安裝
Python安裝:(control+`)
? ? ? ? ? ? ? brew install python3
? ? ? ? ? ? ? pip3 install virtualenv
? ? ? ? ? ? ?pip3 install pylint
? ? ? ? ? ? ?pip3 install yapf? (Alt+shift+F即可自動(dòng)化格式代碼? )
? ? ? ? ? ? ?pip3 install flake8(自動(dòng)檢測(cè)錯(cuò)誤)
配置Python環(huán)境:VS Code->Extension ->Python->Install->Reload;調(diào)試Python文件:編輯文件->Debug->選擇python: current file->設(shè)置斷點(diǎn)->運(yùn)行即可
? ? ? ? Code->Preference->Setting->settings.json
? ? "python.pythonPath": "python3",
? ? "python.linting.enabled": false,
? ? "python.linting.flake8Enabled": true,
? ? "python.formatting.provider": "yapf",
? ? "files.autoSave": "afterDelay",
? ? "files.autoSaveDelay": 1000,
? ? "files.insertFinalNewline": true
7.中文亂碼問題
? ? Excel打開csv亂碼:先用Excel打開csv文件剖淀,然后在菜單欄Excel->Preferences->East Asian Languages->Select a language->Simplified Chinese,然后關(guān)掉Excel纤房,重新打開祷蝌,即可
? ? 解壓亂碼:設(shè)置默認(rèn)使用Unar進(jìn)行文件解壓
8.VSCode
VS Code安裝配置:安裝很簡(jiǎn)單,從網(wǎng)站下載:https://code.visualstudio.com/帆卓,解壓后將Visual Studio Code.app直接拖入Applications即可巨朦;
? ? 插件:
????????Chinese (Simplified) Language Pack for Visual Studio Code(command+shift+P->config->Locale)
????????Python Extention for Visual Studio Code
????????auto close tag
????????vscode-icons
????????open-in-browser
????????html snippets
????????debug for chrome
? ? 操作:
????????Command+Shift+P->config
????????Control +`? 打開命令行
? ? 解決更新失敗的問題(permission denied):
????????1. 這一步是需要輸入密碼的sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt
????????2. 這一步是不需要輸入密碼的, 如果不進(jìn)行第一步,第二步會(huì)報(bào)錯(cuò)sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt/*
? ? ? ? ?3. 更新xattrxattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app
9.WIFI診斷和配置調(diào)優(yōu)
按住Option的同時(shí)剑令,單擊WIFI標(biāo)志可以Enable WIFI log或打開wireless diagnostics(windows->performance/scan)進(jìn)行診斷或
alias airport='sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport'
? ? ? $ airport -s # Scanning
$ airport prefs # Display airport preferences
$ airport prefs joinMode=Strongest # Join mode
$ airport prefs JoinModeFallback=KeepLooking
# Seehttp://apple.stackexchange.com/a/144832
JoinMode (String)
? ? Automatic
? ? Preferred
? ? Ranked
? ? Recent
? ? Strongest
10.創(chuàng)建centos啟動(dòng)盤糊啡,Windows按F12選擇啟動(dòng)順序
格式化USB:Launchpad->Others->Disk Utility->USB Disk->Erase.
制作啟動(dòng)盤
#hdiutil convert -format UDRW -o CentOS-7-x86_64-Everything-18101.dmg CentOS-7-x86_64-Everything-18101.iso
#diskutil list
#diskutil unmountDisk /dev/disk2
#sudo dd if=CentOS-7-x86_64-Everything-18101.dmg of=/dev/rdisk2 bs=1m