Other stuff about Linux

Conda Environments

Use miniconda for minimal install

  • Download the latest version
  • Remember to check keys before installing!

Use mamba for faster package management

  • Mamba supports parallel downloading and uses libsolv for faster dependency solving
  • Install with:
    conda install -c conda-forge mamba -y
    
  • For future package installs, replace conda with mamba:
    mamba install package
    

Docker

Compose Helpers

alias dcu='sudo docker-compose up -d'                   # Start all services in background
alias dcd='sudo docker-compose down --remove-orphans'   # Destroy all services
alias dcp='sudo docker-compose ps'                      # Show port mappings
alias dcr='dcd && dcu'                                  # Restart all services in background

Ports

Kill specific port

killport() {
    fuser -n tcp -k $1
}

Security

Check for existing keys

for key in ~/.ssh/id_*; do ssh-keygen -l -f "${key}"; done | uniq

Generate ed25519 key

ssh-keygen -o -a 255 -t ed25519 -f ~/.ssh/id_ed25519 -C "user@host"