Article Directory
Install HomeBrew
It’s easy to use the official command directly to get 443, the reason you know ^^
Use the script of the domestic boss https://gitee.com/cunkai/HomebrewCN.git, on gitee, everyone can star by the way and support the boss .
Installation command:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
emmm... It may be necessary to input the password hundreds of times during installation, which is normal. . .
Command Line Tools may need to be installed during script execution. If the installation fails, please install it on Baidu. You will not be able to contact me. . . (For free, serious face)
Can be used after the end
brew -v
Verify
Install google-chrome (Google Chrome)
HomeBrew has been installed before, google-chrome can be installed directly with commands
brew cask install google-chrome
Installation and configuration oh-my-zsh
Install update zsh
brew install zsh
Switch bash to zsh
chsh -s /bin/zsh
Install oh-my-zsh
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
vim ~/.zshrc
Set your favorite theme, modify ZSH_THEME in ~/.zshrc
ZSH_THEME="xiong-chiamiov"
The theme effects are as follows:
problem solved
In the first line plus the reference
ZSH_DISABLE_COMPFIX=true
The purpose is to solve the following problems
[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.
[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.
In addition, add in the last line of ~/.zshrc
source ~/.bash_profile
It can avoid the problem that environment variables become invalid after the Mac system is changed to zsh.
Solve the problem of no sound after sleep wakeup
Perform the following two sentences in the terminal
sudo kextunload /System/Library/Extensions/AppleHDA.kext
sudo kextload /System/Library/Extensions/AppleHDA.kext
Script content
on run {input, parameters}
do shell script "" with administrator privileges
set the rootPwd to text returned of (display dialog "Enter your root passwd:" default answer "" with hidden answer)
try
do shell script "echo " & rootPwd & "|sudo -S killall coreaudiod"
do shell script "echo " & rootPwd & "|sudo -S kextunload /System/Library/Extensions/AppleHDA.kext"
do shell script "echo " & rootPwd & "|sudo -S kextload /System/Library/Extensions/AppleHDA.kext"
do shell script "sudo -k" --logout root
display dialog "The operation has been completed. If no problem is fixed,
please restart the system." buttons {"OK"} with icon 1 with title "Success"
on error
display dialog "Password error, please rerun." buttons {"OK"} with icon caution with title "Error"
end try
return input
end run
Terminal using FTP
brew install lftp
usage
lftp ftp://用户名:密码@地址
After login
set ftp:charset gbk
set file:charset utf8
Reference: https://www.jianshu.com/p/78e3651e64ae