Enregistrement de la configuration du système Mac

Installez HomeBrew

Il est facile d'utiliser la commande officielle directement pour obtenir 443, la raison pour laquelle vous savez ^^
Utilisez le script du boss domestique https://gitee.com/cunkai/HomebrewCN.git, sur gitee, tout le monde peut jouer en passant et soutenir le boss .
Commande d'installation:

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

emmm ... Il peut être nécessaire de saisir le mot de passe des centaines de fois pendant l'installation, ce qui est normal. . .

Les outils de ligne de commande devront peut-être être installés lors de l'exécution du script. Si l'installation échoue, veuillez l'installer sur Baidu. Vous ne pourrez pas me contacter. . . (Pour un visage sérieux et gratuit)

Peut être utilisé après la fin

brew -v

Vérifier

Installez google-chrome (Google Chrome)

HomeBrew a déjà été installé, google-chrome peut être installé directement avec des commandes

brew cask install google-chrome

Installation et configuration oh-my-zsh

Installer la mise à jour zsh

brew install zsh

Passer de bash à zsh

chsh -s /bin/zsh

Installez 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

Définissez votre thème préféré, modifiez ZSH_THEME dans ~ / .zshrc

ZSH_THEME="xiong-chiamiov"

Les effets de thème sont les suivants:
Insérez la description de l'image ici

problème résolu

Dans la première ligne plus la référence

ZSH_DISABLE_COMPFIX=true

Le but est de résoudre les problèmes suivants

[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.

De plus, ajoutez dans la dernière ligne de ~ / .zshrc

source ~/.bash_profile

Cela peut éviter le problème que les variables d'environnement deviennent invalides après le changement du système Mac en zsh.

Résolvez le problème de l'absence de son après le réveil du sommeil

Exécutez les deux phrases suivantes dans le terminal

sudo kextunload /System/Library/Extensions/AppleHDA.kext
sudo kextload /System/Library/Extensions/AppleHDA.kext

Contenu du script

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 utilisant FTP

brew install lftp

usage

lftp ftp://用户名:密码@地址

Après connexion

set ftp:charset gbk
set file:charset utf8

Référence: https://www.jianshu.com/p/78e3651e64ae

Je suppose que tu aimes

Origine blog.csdn.net/VOlsenBerg/article/details/106342430
conseillé
Classement