- O que é APT sources list?
- APT sources list (/etc/apt/sources.list) defines repositories where Debian/Ubuntu systems baixar software packages. Key components: Repository tipo (deb, deb-src), Mirror URL (server address), Distribution (focal, jammy, bullseye), Components (main, universe, restricted). Proper source configuration can improve package installation speed by 10x+ (using local mirrors).
- Qual mirror should I escolher?
- Mirror selection criteria: Geographic location (closest mirror), Network (education/público/cloud), Reliability (uptime), Sync frequency (mais recente updates). China recommendations: Aliyun (estável, rápido), Tencent (cloud servers), USTC (education network), Huawei (enterprise). International: Official mirrors (arquivar.ubuntu.com), Regional mirrors (apt-mirror.org). Tip: Testar multiple mirrors (apt-obter atualizar speed) and escolher the fastest.
- Como safely change APT sources?
- Seguro change passos: 1) Backup original: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup. 2) Edit novo sources: sudo nano /etc/apt/sources.list. 3) Atualizar sources: sudo apt-obter atualizar. 4) Verificar errors: if errors, restore backup. 5) Upgrade packages: sudo apt-obter upgrade. This tool auto-generates backup/restore scripts. Importante: Always backup your system before changes.
- Difference between HTTPS and HTTP mirrors?
- HTTPS mirrors provide encrypted transmission for melhor security. Advantages: Prevent man-in-the-meio attacks, Prevent package tampering, Privacy protection (hide baixar content). Disadvantages: Slightly slower (criptografia overhead), Requires apt-transport-https. HTTP: Faster but less seguro. Recommendation: HTTPS for production servers, HTTP for personal testing. Nota: APT verifies packages with GPG signatures, so HTTP is also relatively seguro.
- Como troubleshoot APT atualizar errors?
- Common errors and solutions: 404 Not Found: Verificar distribution version (lsb_release -a), Use correct codename. GPG errors: Atualizar apt-key, Re-importar keys. Conexão timeout: Change mirror, Verificar network. Lock file: Kill other APT processes, Excluir /var/lib/dpkg/lock. Hash Sum mismatch: apt clean, Limpar cache. This tool generates validated sources to reduce errors.