cd
cd /usr/local/bin 進(jìn)入到本地bin目錄
cd (不帶參數(shù))進(jìn)入root根目錄
cd ~ 進(jìn)入root根目錄
cd - 返回上一個訪問的目錄
cd .. 進(jìn)入上級目錄
cd+拖動文件到命令行 進(jìn)入當(dāng)前文件目錄
open
open . 打開當(dāng)前目錄文件,在Finder中顯示
設(shè)置Finder顯示隱藏文件
cd到根目錄,執(zhí)行命令
defaults write com.apple.finder AppleShowAllFiles -bool true
findder 快捷鍵:commond + shift + .
顯示
cd到任意文件诀浪,執(zhí)行命令ls
ls 列出當(dāng)前目錄下所有文件
關(guān)機
立即關(guān)機
sudo shutdown -h now
sudo halt
10分鐘后關(guān)機
sudo shutdown -h +10
晚上8點關(guān)機
sudo shutdown -h 20:00
重置macOS音頻核心法
sudo killall coreaudiod
打開profile文件
sudo vim /etc/profile
使命令生效 == 重啟終端
source /etc/profile
Mac .bash_profile中修改的環(huán)境變量只對當(dāng)前窗口有效服傍。自從MacOS Monterey12.5.0后,mac系統(tǒng)已經(jīng)默認(rèn)把zshrc作為系統(tǒng)級入口节猿,.zshrc在電腦每次自啟時都會生效(永久有效)票从。一般會在~/.zshrc中添加source ~/.bash_profile,以確保.bash_profile中的修改永久生效滨嘱。
cd /etc