Homebrew Package Manager
Traduzione: Copia tutti i comandi
Traduzione: Generare PDF
< >
Comandi e flussi di lavoro completi per la gestione dei pacchetti macOS e Linux.
## Installazione e configurazione
### Installare Homebrew
Traduzione:
### Operazioni di pacchetti di base
| | Command | Description | |
| --- | --- |
| | `brew install package_name` | Install package | |
| | `brew uninstall package_name` | Uninstall package | |
| | `brew upgrade` | Upgrade all packages | |
| | `brew upgrade package_name` | Upgrade specific package | |
| | `brew list` | List installed packages | |
| | `brew outdated` | List outdated packages | |
## Informazioni sul pacchetto
### Ricerca e Informazioni
| | Command | Description | |
| --- | --- |
| | `brew search keyword` | Search for packages | |
| | `brew info package_name` | Show package information | |
| | `brew list --versions` | List installed packages with versions | |
| | `brew deps package_name` | Show package dependencies | |
| | `brew uses package_name` | Show packages that depend on this | |
| | `brew home package_name` | Open package homepage | |
### Dettagli del pacchetto
| | Command | Description | |
| --- | --- |
| | `brew desc package_name` | Show package description | |
| | `brew cat package_name` | Show package formula | |
| | `brew edit package_name` | Edit package formula | |
| | `brew log package_name` | Show package commit history | |
## Gestione Cask (applicazioni GUI)
### Cask Operazioni
| | Command | Description | |
| --- | --- |
| | `brew install --cask app_name` | Install GUI application | |
| | `brew uninstall --cask app_name` | Uninstall GUI application | |
| | `brew list --cask` | List installed casks | |
| | `brew search --cask keyword` | Search for casks | |
| | `brew info --cask app_name` | Show cask information | |
| | `brew upgrade --cask` | Upgrade all casks | |
### Popolari Caschi
| | Cask | Description | |
| --- | --- |
| | `visual-studio-code` | VS Code editor | |
| | `google-chrome` | Chrome browser | |
| | `docker` | Docker Desktop | |
| | `slack` | Slack messaging | |
| | `zoom` | Zoom video conferencing | |
| | `spotify` | Spotify music | |
## Gestione dei servizi
### Operazioni di servizio
| | Command | Description | |
| --- | --- |
| | `brew services list` | List all services | |
| | `brew services start service_name` | Start service | |
| | `brew services stop service_name` | Stop service | |
| | `brew services restart service_name` | Restart service | |
| | `brew services run service_name` | Run service once | |
### Servizi comuni
| | Service | Description | |
| --- | --- |
| | `postgresql` | PostgreSQL database | |
| | `mysql` | MySQL database | |
| | `redis` | Redis cache | |
| | `nginx` | Nginx web server | |
| | `mongodb-community` | MongoDB database | |
## Gestione del nastro (Repositori di terze parti)
### Toccare le operazioni
| | Command | Description | |
| --- | --- |
| | `brew tap` | List tapped repositories | |
| | `brew tap user/repo` | Add tap | |
| | `brew untap user/repo` | Remove tap | |
| | `brew tap-info user/repo` | Show tap information | |
### Nastri popolari
| | Tap | Description | |
| --- | --- |
| | `homebrew/cask-fonts` | Fonts collection | |
| | `homebrew/cask-versions` | Alternative app versions | |
| | `homebrew/services` | Service management | |
| | `mongodb/brew` | MongoDB packages | |
## Manutenzione del sistema
### Operazioni di pulizia
| | Command | Description | |
| --- | --- |
| | `brew cleanup` | Remove old versions | |
| | `brew cleanup package_name` | Clean specific package | |
| | `brew cleanup --prune=all` | Remove all old downloads | |
| | `brew autoremove` | Remove unused dependencies | |
### Salute e diagnostica
| | Command | Description | |
| --- | --- |
| | `brew doctor` | Check system for issues | |
| | `brew missing` | Check for missing dependencies | |
| | `brew config` | Show Homebrew configuration | |
| | `brew --version` | Show Homebrew version | |
## Uso avanzato
### Sviluppo della Formula
| | Command | Description | |
| --- | --- |
| | `brew create URL` | Create new formula | |
| | `brew edit package_name` | Edit formula | |
| | `brew install --build-from-source package` | Build from source | |
| | `brew test package_name` | Test formula | |
### Gestione della versione
| | Command | Description | |
| --- | --- |
| | `brew pin package_name` | Pin package version | |
| | `brew unpin package_name` | Unpin package version | |
| | `brew switch package_name version` | Switch to specific version | |
| | `brew list --versions package_name` | Show available versions | |
### Gestione del Bundle
Traduzione:
| | Command | Description | |
| --- | --- |
| | `brew bundle` | Install from Brewfile | |
| | `brew bundle dump` | Create Brewfile | |
| | `brew bundle cleanup` | Uninstall unlisted packages | |
| | `brew bundle check` | Check Brewfile status | |
## Configurazione
### Variabili dell'ambiente
| | Variable | Description | |
| --- | --- |
| | `HOMEBREW_PREFIX` | Installation prefix | |
| | `HOMEBREW_CELLAR` | Package installation directory | |
| | `HOMEBREW_REPOSITORY` | Homebrew repository location | |
| | `HOMEBREW_CACHE` | Download cache directory | |
### File di configurazione
| | File | Description | |
| --- | --- |
| | `~/.homebrew/` | User configuration | |
| | `/opt/homebrew/` | Installation directory (Apple Silicon) | |
| | `/usr/local/` | Installation directory (Intel) | |
| | `Brewfile` | Package bundle file | |
## Risoluzione dei problemi
### Questioni comuni
| | Problem | Solution | |
| --- | --- |
| | Permission errors | `sudo chown -R $(whoami) /opt/homebrew` | |
| | Outdated Xcode tools | `xcode-select --install` | |
| | Broken symlinks | `brew doctor && brew cleanup` | |
| | Formula conflicts | `brew unlink package && brew link package` | |
### Reimpostare e reinstallare
| | Command | Description | |
| --- | --- |
| | `brew uninstall --force package_name` | Force uninstall | |
| | `brew reinstall package_name` | Reinstall package | |
| | `brew link --overwrite package_name` | Force link | |
| | `brew prune` | Remove dead symlinks | |
### Debug
| | Command | Description | |
| --- | --- |
| | `brew --debug install package` | Debug installation | |
| | `brew --verbose install package` | Verbose installation | |
| | `brew gist-logs package_name` | Create gist of logs | |
## Ottimizzazione delle prestazioni
### Operazioni parallele
Traduzione:
### Gestione della cache
| | Command | Description | |
| --- | --- |
| | `brew cleanup --prune=7` | Keep 7 days of downloads | |
| | `du -sh $(brew --cache)` | Check cache size | |
| | `rm -rf $(brew --cache)` | Clear all cache | |
## Sicurezza
### Verifica dei pacchetti
| | Command | Description | |
| --- | --- |
| | `brew audit package_name` | Audit package formula | |
| | `brew style package_name` | Check formula style | |
| | `brew install --verbose package` | Show detailed install process | |
### Pratiche sicure
1. **Aggiornamento regolare**: Mantenere Homebrew e pacchetti aggiornati
2. **Trusted Taps**: Aggiungi solo rubinetti di terze parti fidati
3. **Review Formulas**: Controllare le formule prima dell'installazione
4. **Backup**: Mantenere Brewfile per un facile restauro
5. **Permissioni**: Evitare di correre con sudo
## Integrazione
### Integrazione di Shell
Traduzione:
### Flusso di lavoro
Traduzione:
## Migliori Pratiche
### Gestione dei pacchetti
1. **Manutenzione regolare**: Corri `brew update && brew upgrade` settimanale
2. **Cleanup**: Pulizia regolare delle vecchie versioni e della cache
3. **Bundle Files**: Usa Brewfile per la consistenza del team
4. **Pin Critical**: pacchetti Pin che necessitano di versioni specifiche
5. **Documentazione**: Rubinetti e configurazioni per documenti personalizzati
### Ambiente
1. **Responsabili della missione ** Utilizzare la versione manager per le lingue (nvm, pyenv, rbenv)
2. **Ambiente virtuale**: dipendenze del progetto isolate
3. ** Gestione dei servizi** Utilizzare servizi di birra per database di sviluppo
4. **Path Management**: Mantenere PATH pulito e organizzato
5. ** Strategia di backup**: dump Brewfile regolari e backup dotfile
### Prestazioni
1. **Parallel Downloads**: Abilita operazioni parallele
2. **Cache Management** Pulizia della cache regolare
3. **Analitici**: Disattiva analisi per operazioni più veloci
4. **GitHub Token**: Utilizzare GitHub token per i limiti di velocità API
5. ** Ottimizzazione SSL**: Memorizzare la cache su storage più veloce